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

Пребарај: #christophercolumbusday

当前筛选 #christophercolumbusday清除筛选
Reuters: World

@reutersworldchannel · Post #149248 · 12.10.2021 г., 12:45

October 12, 2021: Texas Governor, San Diego crash, U.S. Navy, Indigenous Peoples' Day, Afghanistan October 12, 2021: Texas Governor, San Diego crash, U.S. Navy, Indigenous Peoples' Day, Afghanistan 1. Republican Texas Governor Greg Abbott, responding to what he called "bullying" by the Biden Administration, barred all COVID-19 vaccine mandates in the state by any entity, including private employers. 2. A small aircraft crashed blocks from a high school campus near San Diego, killing at least two people and injuring two others, while also destroying homes, officials and local media said. 3. Former U.S. Navy nuclear engineer and his wife are scheduled to face their first court hearing on charges they attempted to sell secrets about nuclear submarines to a foreign power in exchange for cryptocurrency. 4. Christopher Columbus Day drew crowds with U.S. city parades marking the explorer's voyage and Italian-American culture, as the focus increasingly turned to the heritage and plight of indigenous people subjugated by European settlers. 5. Afghanistan's foreign minister appealed to the world for good relations but avoided making firm commitments on girls' education despite international demands to allow all Afghan children to go back to school. #TexasGovernor #GregAbbot #Republican #Covid19 #Biden #SanDiego #Aircraftcrash #UnitedStates #Navy #Cryptocurrency #ChristopherColumbusDay #Parades #Afghanistan #News #Reuters Subscribe: http://smarturl.it/reuterssubscribe Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled. Get the latest news on: http://reuters.com/ Follow Reuters on Facebook: https://www.facebook.com/Reuters Follow Reuters on Twitter: https://twitter.com/Reuters Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en ➖@reutersworldchannel➖