TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #175 · 30 окт.

В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль QtCompat (compatibility). Там не так много функций но они довольно полезны. Этот модуль содержит унификаци модуля shiboken2, функций loadUi, translate и несколько переименованных функций классов или изменённую сигнатуру аргументов и возвращаемых значений. Это единственное исключение из правила когда вам потребуется где-то изменить свой код кроме импортов и этот код не похож на обычный код PySide2. Например, в PyQt4 и PySide есть метод QHeaderView.setResizeMode Для PyQt5 и PySide2 они были благополучно переименованы в QHeaderView.setSectionResizeMode Чтобы применить этот метод следует использовать такой код from Qt import QtCompath header = self.horizontalHeader() QtCompat.QHeaderView.setSectionResizeMode(header, QtWidgets.QHeaderView.Fixed) Унификация загрузки UI файлов: # PySide2 from PySide2.QtUiTools import QUiLoader loader = QUiLoader() widget = loader.load(ui_file) # PyQt5 from PyQt5 import uic widget = uic.loadUi(ui_file) # Qt.py from Qt import QtCompat widget = QtCompat.loadUi(ui_file) Хорошо что таких моментов не много и их легко запомнить. Полный список можно посмотреть в таблице. #qt#tricks

Hashtags

Резултати

Пронајдени 1 слични објави

Пребарај: #promptwriting

当前筛选 #promptwriting清除筛选
Pensive|

@PensivePost · Post #5010 · 20.03.2021 г., 07:24

Every day people from all parts of the world would remind me how amazing their lives are and how mine isn't. I notice most of the people around me are just pretending to be happy, they show me what they want me to see not what i'm needed to see. I somehow know the truth but it's just so tough to believe it. It's just that my heart is so used to being sad about every other single situation, now it finds it challenging to become something it has never been. Honestly, my heart gave up on me a long time ago because my dumbass would always try to find reasons to make myself feel like shit. With time I reached a point where I no more cared if I was happy or not.I had no idea about what I was trying to do with myself. I didn't care if I watched that tv show which I used to enjoy, I didn't care if I ate those chicken rolls that my mom prepared just for me because I would beg her to make them, I didn't care if I was healthy, I didn't care about my looks, desires, likes, dislikes. I reached a point where I had no more fucks left with me to give to the world or to myself. During one of the summer holidays my best friend who came to visit me after two whole years would scan my whole appearance with a concerned disgust in his eyes. "Well, you look like shit. I heard from your mom that you haven't eaten anything since last two days. Are you trying to kill yourself or some shit? " I smiled because I finally figured out what I was trying to do with myself. "Hopefully" #review#J # #promptWriting (English isn't my first language, I need constructive criticism 😭)