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 слични објави

Пребарај: #vivektavinita

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

@PensivePost · Post #5848 · 08.07.2022 г., 21:06

I rushed down stairs. The wild energy around her was affecting me. Not only affecting me but turning me into the perfect dumbass. So I thought its good idea if I catch up with my buddy before a vapourising. Reaching on the last step, I looked up at the direction of my room. One second... What she is doing in my room? Rubbing the temple of my head, I dismiss all the cascading thoughts and marched towards the kitchen. "Oww, Holy hell" One second I was marching with my head held high and now I was embracing the pavement. Wow just great. I haven't been this lucky in my whole life. And suddenly I was showered with the God's grace. And I don't think I like it. "Sir...what are you doing on the floor" A very confused Lola, inquired with the bucket that she just emptied on me "I'm kissing the floor, Lola" I replied politely, well my system is shaken now, especially the one which is responsible for my emotions and feelings. "How did you fell ?" Vivek asked in very concerned voice, rushing to me. "No Vivek sir he is not fallen, he is just kissing the floor" Lola beamed from somewhere and I didn't even had energy to facepalm. " And why you are wet?" He inquired " Ohh wow he talks " My lips formed in knowing smile, well it's more like a grin. Actually I was just taunting him. for turning my life upside down. A if it wasn't already. "Yeah sir he talks very much and politely" She beamed again from somewhere and I couldn't do anything more than sighing "Why you are wet? " Vivek asked again ignoring Lola. He is really good in ignoring people. "It's God's grace in liquid form" I murmured, sinking my body in floor. "No sir I just dropped water on him that I was using for cleaning" Stupid woman chirped again, it's better if she murders herself because I will do it brutally and she won't like it, I don't even need to say how ruthless I'm, That idiot doesn't know when to use her mouth and mind, but I'm not even sure if she has mind. #Vivektavinita#Review#paragraph#novel