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

Резултати

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

Пребарај: #sgparksnrec

当前筛选 #sgparksnrec清除筛选
MND Singapore

@mndsingapore · Post #302 · 26.04.2022 г., 03:46

Did you know? The Round Island Route (RIR) is the longest recreational connection that encircles Singapore in the east, stretching across 75km. But this is only Phase One of the project. The completed RIR will be 150km long, as part of NParks’ overall plans to curate a 360km island-wide network of recreational park connectors and trails. This greatly supports our transformation into a City in Nature, a key pillar in the Singapore Green Plan. While we await the RIR’s completion, check out these six key areas that are connected through Phase One of the RIR! #SGParksNRec#CityinNature For more details on each of these areas, go to go.gov.sg/rir-mnd

MND Singapore

@mndsingapore · Post #315 · 06.05.2022 г., 11:27

It’s #Friyay! 🎉 Have you checked out Rower’s Bay, a tranquil section on the Round Island Route (RIR)? It’s a perfect rest stop that features a boardwalk close to the wetland and a lookout pavilion over Lower Seletar Reservoir. The RIR is part of Singapore’s efforts to provide increased accessibility to nature spaces across the island, and enhance ecological connectivity between our natural habitats. For more on the RIR, visit go.gov.sg/rir-mnd #SGParksNRec#CityinNature

MND Singapore

@mndsingapore · Post #264 · 07.02.2022 г., 06:24

A data scientist and nature lover, Max Fun chose his home in the one-north district due to its proximity to his workplace at Biopolis. He soon discovered the nearby #onenorthPark - a beautiful 16-hectare green oasis set amidst the many high-rise offices in the area, which serves as an integrated green link and provides shared community spaces for park-goers and residents to enjoy 🌿 Besides making use of the naturally shaded walkways on his commute to his office, Max enjoys his weekly jogs around the park, or simply strolling along the boardwalk (it’s a 10-minute run to the Rail Corridor!), which he says makes him feel like he's "in a totally different world". The open lawns and magnificent trees and shrubs provide a welcome retreat whenever Max wants to take a break from work. He adds that it's such a treat to walk through the park and be able to spot interesting birds, squirrels and other wildlife on these little journeys. #onenorthPark#NParks#SGParksNRec