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

Резултати

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

Пребарај: #reducereuserecycle

当前筛选 #reducereuserecycle清除筛选
NEA Singapore

@NEASingapore · Post #560 · 05.06.2023 г., 23:45

Getting excited over the 6.6 sales? Ask yourself if you really need the item before adding it to your cart! Consider using or repairing what you have, instead of replacing it. #ReduceReuseRecycle Check out some tips here: https://www.youtube.com/playlist?list=PLPX9rYUbMZF3GLoLkP2Bxd0TelSHylBOu

NEA Singapore

@NEASingapore · Post #55 · 20.05.2020 г., 10:00

It can be very tempting to do online shopping this circuit breaker period, but think about whether you really need it before you put it in your cart! #ReduceReuseRecycle

NEA Singapore

@NEASingapore · Post #450 · 25.10.2022 г., 00:45

Dressing up as your favourite superhero this Halloween? Get creative and make a costume using everyday household items. When you’re done, recycle or reuse what you can of your outfit, so that your superhero legacy will continue to live on 🦸‍♂️ #3Rs#ReduceReuseRecycle

NEA Singapore

@NEASingapore · Post #1080 · 10.07.2025 г., 01:03

60 years of progress, but what’s next for Singapore? Higher temperatures, more wet and dry extremes, and accelerating increase in mean sea levels are projected. In the worst-case scenario, the 𝗺𝗲𝗮𝗻 𝘀𝗲𝗮 𝗹𝗲𝘃𝗲𝗹 around Singapore is projected to 𝗿𝗶𝘀𝗲 𝗯𝘆 𝟭.𝟭𝟱𝗺 𝗯𝘆 𝘁𝗵𝗲 𝗲𝗻𝗱 𝗼𝗳 𝘁𝗵𝗲 𝗰𝗲𝗻𝘁𝘂𝗿𝘆, and up to 𝗮𝗿𝗼𝘂𝗻𝗱 𝟮𝗺 𝗯𝘆 𝟮𝟭𝟱𝟬. Let’s commit to a sustainable future by taking climate actions to reduce our waste and carbon footprint. #3Rs#ReduceReuseRecycle#SG60

NEA Singapore

@NEASingapore · Post #1095 · 09.08.2025 г., 01:02

Happy 60th National Day, Singapore! 🇸🇬 As we celebrate our progress as a nation, let’s also commit to building a #SustainableSG for present and future generations. Let’s reduce our carbon footprint by taking climate actions such as adopting energy-saving and #ReduceReuseRecycle habits. #SG60#KeepSGClean

NEA Singapore

@NEASingapore · Post #645 · 18.09.2023 г., 03:31

#ProTip: There’s no need to sort your recyclables! Paper, plastic, glass, and metal can all be placed in the recycling bins ♻️✌️ But do remember to CHECK and CLEAN before you RECYCLE: www.go.gov.sg/recycleright #RecycleRight#ReduceReuseRecycle

NEA Singapore

@NEASingapore · Post #1012 · 22.03.2025 г., 01:04

Switch off for #EarthHour at 8:30pm! But let's not stop there. Let this yearly reminder inspire us to continue making sustainable choices. Your everyday choices matter more than you might think! Small steps such as adopting energy-saving habits and recycling right can make a difference. Imagine these small acts being amplified by millions worldwide. 🌍💚 #EnergyEfficiency#ReduceReuseRecycle#RecycleRight

12
ПретходнаСтраница 1 од 2Следна