В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
Nameless AOSP - Official | Android 13 | Nothing Phone (2)
📝 Details:
- Version: 1.4
- Status: #Official
- Device: Pong
- Released: 26/11/23
⬇️Download : Build l Images
👀 Changelogs : Here
🌳Device Tree : Here
📔Flashing Instructions : Here
🎙Support Group: Here
🏛 XDA : Here
📸 Screenshots:Here
💰Donate : Paypal | UPI : chandudyavanapelli3-1@okhdfcbank
🏷Tags : #AOSP#ROM#Nameless#T
❌Known Issues:
- No NFC Support (Sadly PN560 NFC is not supported in Android 13. Will be revisited once we move to Android 14)
✍️Note:
- Report issues (if any except known ones) with logs in support group / comments
- This is the final Android 13 release. We will start work on Android 14 from 2024 January.
🏆 Credits:
- Chandu Dyavanapelli for initial DT bringup
- Pong Dev and Testing Team & Contributors
👤 Maintainer : @Chandu_Dyavanapelli
🔔 Updates : @NothingPhone2Updates
🐙 Chat : @NothingPhone2
Nameless AOSP | Android 13 | Nothing Phone (2)
📝 Details:
- Version: 1.4
- Build: #Beta
- Status: #Official
- Device: Pong
- Released: 12/11/23]
⬇️Download : Build l Images
🌳Device Tree : Here
📔Flashing Instructions : Here
🎙Support Group: Here
📸 Screenshots:Here
💰Donate : Paypal
🏷Tags : #AOSP#ROM#Nameless#T
✨ Changelogs:
- Initial Test Build
❌ Known issues:
- NFC is broken, causing the system UI to crash after every reboot, but only once.
- Haptics are not similar to stock but will improve in upcoming builds.
- Dont use "Hey Google" as it leads to crashdump. Use factory reset to revive.
- Some device specific features are not added, will be added eventually.
- Report bugs (with logs ofc) in the comment section.
🏆 Credits:
- Chandu Dyavanapelli for initial DT bringup
- Pong Dev and Testing Team & Contributors
👤 Maintainer : @Chandu_Dyavanapelli
🔔 Updates : @NothingPhone2Updates
🐙 Chat : @NothingPhone2
Nameless CLO - Official | Android 15 | Nothing Phone (2)
🗒 Details:
- Version: A15
- Codename: #Pong
- Released: 22/12/24
🔽 Download: ROM [ Sourceforge l Mirror ] || Images [ Sourceforge l Mirror ]
🆘 Support : Telegram l Wiki
⚙️ Installation: Here
📸 Screenshots: Here
💵 Donate: Paypal | UPI: dyavanapellichandu@ybl
🔖 Tags : #ROM#CLO#Nameless#V#Official#NothingPhone2
✨Source Changelogs:
- Initial A15 Release based on CLO
✍️ Note:
- A clean flash is required if you're coming from Nameless-AOSP or any custom ROMs.
- You will not receive OTA updates in Nameless-AOSP for this build.
👤 Dev : Chandu Dyavanapell
🔔 Updates : @NothingPhone2Updates
💬 Chat : @NothingPhone2
Nameless AOSP - Official | Android 14 | Nothing Phone (2)
🗒 Details:
- Version: A14 - Final
- Codename: #Pong
- Released: 14/09/24
🔽 Download: Here | Mirror
🆘 Support : Here
⚙️ Installation: Here
📸 Screenshots: Here
💵 Donate: Paypal | UPI: dyavanapellichandu@ybl
🔖 Tags : #ROM#AOSP#Nameless#QPR3#U#Official#NothingPhone2
✨Source Changelogs:
- Merged September security patch
- Updated default wallpaper and boot animation
- Add navbar animation in pixel launcher
- Stability improvements and minor fixes
✍️ Note:
- This is the final A14 release and no OTA update exists for the same.
- Please update manually in recovery mode
👤 Dev : Chandu Dyavanapell
🔔 Updates : @NothingPhone2Updates
💬 Chat : @NothingPhone2