В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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 Magic Behind 'John Wick 4': Action Without Limits#BehindTheScenes
Keanu Reeves took his commitment to the max for 'John Wick 4', undergoing 12 weeks of intense training to perform unprecedented action scenes. 🚗🔫 A standout sequence features him driving a car without doors or a windshield through the Arc de Triomphe, all while shooting!
Cinematographer Dan Laustsen chose vibrant colors and ARRI Large Format cameras to capture the essence of locations like Osaka and Paris. Chad Stahelski, the genius behind 'John Wick', meticulously coordinated each fight, ensuring realism and spectacle. Each scene is a visual masterpiece that elevates action cinema to new heights. 🎬💥
📹 Don't miss the behind-the-scenes video here. You'll be amazed at how this action marvel was made!
> #𝘴𝘦𝘳𝘪𝘦𝘴 · 🚀𝘣𝘰𝘰𝘴𝘵
From the Forge #01 — Early sketches of our central crafting system
Hey! We’ve been diving deep into early sketches for one of the key elements in DeckForge — the Forge.
This is the place where something important is being created... but we won’t spoil the details just yet..
Right now:
🔵We're testing visual concepts for the core mechanism
🔵Exploring how materials, energy and crafting logic come together
🔵Prototyping tools like hammers, crystals, and tech-infused devices
This is just the start — most of what you see is raw and mid-process.
But that’s exactly what makes it fun — sharing how it really looks behind the scenes.
#DeckForge#BehindTheScenes
Join the DeckForge Community:
🌐YouTube𝕏Twitter🎮Discord
👉Chat👉Announcements
From the Forge #14: 🔨 | Premium Shop Incoming
Forgers, our team is working on one of the most important features — the in-game Premium Shop
This is where your progress, dedication & $BOOMS holdings will really start to shine.
Based on your activity and tokens, you’ll unlock exclusive Founder Tiers of rewards — packs that will never be available again once the official release.
What does this mean for you?
🔵You’ll be able to claim your Founder Packs & open them once the full release is live
🔵We’re still very early, which means your progress and feedback are critical for shaping the future of DeckForge
Big updates are coming. September will be full of surprises, new features & major announcements. Stay tuned — the best is yet to come.
➡️ Don’t forget: claim your rewards in Discord and secure your special roles. They’ll be more valuable than you think…
Stay Forged.
#DeckForge#ClosedBeta#BehindTheScenes
Join the DeckForge Community:
🌐YouTube𝕏Twitter🎮Discord
👉Chat👉Announcements👉DeckForge
«Говорят, из моего «Назад в будущее» мог бы получиться неплохой мюзикл. Не хочу убедиться в этом при жизни».
Сегодня исполнилось 73 года Роберту Земекису.
#ВИДЕОТЕКА
#RobertZemeckis
#BehindTheScenes
Йост Вакано, ASC, держит свой собственный ARRI IIC на борту подводной лодки во время съемок душераздирающей драмы Второй мировой войны Das Boot (1981) . Рядом с ним первый AC Питер Майвальд, держащий дистанционное управление. «Гламур и очевидная техническая гладкость не имели места в фильме», - написал Вакано в «American Cinematographer». «Камера должна была подчиняться тем же ограничениям, что и актеры. Требование чрезвычайной мобильности в узких пределах лодки не позволяло даже использовать стедикам. Это должна быть ручная камера! » #newsfidllercom#новости#засценой#bts#behindthescenes
Фильм называется "Подводная лодка", рейтинг кинопоиска 8.1 бюджет 14 млн долларов, сборы в США 11 млн. долларов
«Понятие независимости — относительное. Вас нельзя назвать независимым, если вы не снимаете кино за свой собственный счет, чего в здравом уме никто не делает».
Сегодня Джиму Джармушу исполнилось 73 года.
#ВИДЕОТЕКА
#JimJarmusch
#ДжимДжармуш
#BehindTheScenes
📷🎬🎸 Майкл Джей Фокс репетирует знаменитую сцену на съемках фильма «Назад в будущее». Сегодня нашему любимому актеру исполнилось 64 года.
#ВИДЕОТЕКА
#MichaelJFox
#BackToTheFuture
#BehindTheScenes