В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
https://x.com/priceactiongann/status/1833441709151096889
#NIFTY#GIFTNIFTY
🔍 Gift Nifty at 24,780 - This level is critical!
📷 Why This Matters: The current upward trend aligns with the significant cycle of Sensex at 81,170.
(both met exact same Time and Price)
📷Potential Scenarios:
Nifty might test Bounce 24,676 or could see a breakout.
Alternatively, it might ignore this level and head towards a downside trend.
It's in between the zones can range and then follow later!
#sensex#nifty#stocks#BSE#StockMarket
https://x.com/priceactiongann/status/1833441709151096889
https://x.com/priceactiongann/status/1831968467601527029
#nifty#sensex
Sensex 82576 to 81198 done!
This is the First Time posting Sensex
All Time High Almost near price,
Reaches downside and decide here!
Nifty50 Top Price so far from 25300 it dropped
"1440" Price Low to High "Exact Points"!
Bank Nifty Reaches near 51860 Encoded and Dropped from there!
All Cycle is Interconnected, Cycles Rhymes can be seen Obviously once price cycle is reached!
will post calculations later once 144 likes reaches in this post!
#stocks#stockmarket#nifty50#MarketCrash#banknifty#BSE#NSE
https://x.com/priceactiongann/status/1831968467601527029
https://www.youtube.com/watch?v=qjsgh64_1To
https://x.com/priceactiongann/status/1834904231515459918
#nifty#nifty50
New Video!
🔹Trading Insights for NIFTY 50, Sensex, and Bank Nifty
🔹In this video, Explained the NIFTY 50 Jackpot Trade giving you a comprehensive view of where the market might be heading.
📷 Don't forget to LIKE, SHARE, and SUBSCRIBE for more market insights!
#stocks#stockmarket#trading#priceaction#sensex#banknifty#jackpot#nse#bse
https://x.com/priceactiongann/status/1834904231515459918