В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
The RKM 740 Tower.
Architecture studio J Mayer H has completed a mixed-use tower in Düsseldorf, Germany, with profiled metal cladding that opens up like a zipper to provide views through its glazed facades.
J Mayer H won an international competition in 2011 to design the tower, which contains several medical facilities and apartments on the former grounds of the Dominikus-Krankenhaus hospital.
#architecture#arch_shovel#archdaily#NewsArchitecture
Silicon Valley.
Nearly 10 years in the making and the team of 1000+ designers, inventors, programmers, & builders can finally celebrate Google’s first ground-up campus! ⠀
Architecture: BIG
Location: Silicon Valley, California
#arch_shovel#architecture#NewsArchitecture#big
Bridge of spheres.
A futuristic bridge will appear in the Moscow City business center. The project was developed by the chief architect of Moscow Sergey Kuznetsov and architect Dmitry Sukhov.
#arch_shovel#architecture#NewsArchitecture#Кузнецов_проекты
Vltava Philharmonic Hall by Mecanoo.
The competition entry of Vltava Philharmonic Hall, a new musical and cultural center located in the heart of Prague.
Architecture: Mecanoo collaboration with Chybik+Kristof
Image: by Plo.mp, Mangoshake studio and Mecanoo
#NewsArchitecture#News#Architecture#arch_shovel#competition
The proposal for the Philharmonic Hall in Prague by Henning Larsen.
The new Prague Vltava Philharmonic will be the perfect ‘instrument’ - an expression of this place - realized in a new artistic language. Its cresting spires play in harmony with the towers, turrets, steeples and spires that grace the tapestry of the city’s roofscape.
Architecture: Henning Larsen
#danisharchitecture#arch_shovel#NewsArchitecture#competititon#architecture
Philharmonic Hall in Prague by Ludgaard & Tranberg.
Ludgaard & Tranberg’s design proposal created in collaboration with Cobe Architects for the Vlatava Philharmonic Hall in Prague. Music, art, architecture, the city and the audience converge in a concert hall that extends its vibrations far beyond the site by the river Vltava.
Architecture: Ludgaard & Tranberg & Cobe Architects
Acoustics: Gade & Mortensen Akustik
Consultation: Tyrens
#danisharchitecture#arch_shovel#NewsArchitecture#competititon#architecture
The project of a new residential complex in Moscow was approved.
The main design element is small balconies, which resemble a skin of the fantastic animal.
Architecture: “LABVA PRO” LTD bureau and “Architectural Bureau of Katerina Gren”.
#arch_shovel#architecture#moscow#residential#complex#new#NewsArchitecture
The Vltava Philharmonic Hall.
The new Vltava Philharmonic will be built by the Danish architectural studio Bjarke Ingels Group (BIG).
BIG plans to complete the new building in 2032.
“The Vltava Philharmonic Hall is composed as a meandering journey from riverbank to rooftop. Public flows and belvedere plazas unite the city life of Prague to the music within. Its halls are formed for sight, fine-tuned for sound, and orchestrated for functionality and connectivity. From this rhythmic structure, a symphony of colonnades and balconies extend as platforms for public life. Expressive yet pragmatic, the new Philharmonic will ascend to form a key landmark for Prague - from river to roof.” Bjarke Ingels, Founder & Partner, BIG.
#arch_shovel#conpetition#award#cultural#BIG#news#NewsArchitecture
The Shanghai Lingang Special Area master plan.
Design: Ennead Architects
Location: Shanghai, China
Ennead Architects has designed the Shanghai Lingang Special Area master plan (a new hub for global commerce) around the central axis that defines the Dishui Lake district in Shanghai.
One of the key features of the Shanghai Lingang Special Area will be “The Ring”. This circular, cantilevered observation deck, and museum will afford 360-degree views of nearby Dishui Lake, Shanghai and the Pacific Ocean.
The two towers flanking the Ring (The Tower Waterfall and Tower Rhomboid) are designed to become two of the most easily recognizable features of the new business district. Similar in scale, the towers have distinct identities.
#Architecture#arch_shovel#NewsArchitecture#News#Shanghai#China#Masterplan#CityPlanning#OfficeBuilding#CommercialArchitecture#UrbanDistrict#UrbanDesign