В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
#SNX/USDT analysis :
#SNX is currently retracing towards the support zone following a recent impulsive move. It is anticipated that after a breakout from this zone, the price will retest and subsequently bounce back, resuming its bullish momentum.
TF : 1D
Entry : $2.0
Target : $3.4
SL : $1.5
#SNX/USDT analysis :
#SNX has broken and retested the support zone, and it is currently facing resistance from the 200 EMA. The price is likely to continue its bearish momentum from its current level and retest previous lows.
TF : 4H
Entry : $1.353
Target : $1.229
SL : $1.430
#SNX🐻👀
A little bit risky but will worth to try. Use SL.
Want to see more strategies for any coin? Check out CoinLegs in order to have an overview before your trades 📊
UNBELIEVABLE PROFIT OF 23,600% HAS BEEN REALIZED IN #SNX
🔀
We're made a massive 2️⃣3️⃣6️⃣🔤 profit this Trade 🤑🔥
If you had only $50 inthis single position you would've made $11,800⭐
Went from 7,910% to 23,615%—That’s an extra 15,705% profit just by holding for maximum gains🥂🔥
If you're someone who's been following our progress, but haven't yet joined the PREMIUM group, what's holding you back? You can see the consistent profits we're making on a regular basis. The only difference between you and the members who send us the positive feedback you see, is that they took action and joined the PREMIUM group.
It's business as usual - every day, like clockwork, we are in the fast lane, leaving the competition eating our dust
😮💨🪙
If you are ready to step up, send me a message and let's get started 👇
@Kevindexter✅
🔀#SNX/USDT 2,170% profit, insane move! 🤯
That’s 2️⃣1️⃣🔤 gain on your money 💰🔥
💰$50 would return $3600💸
💰$50 would return $1,085💎
💰$50 would return $1,085💎
Fast & solid results—that’s what we love the most. Any guesses on who’s missing out again? 🤔
Enjoy 2,170% profit🆙. 🤝Congratulations all Premium Members.
Now imagine if you followed the rest of the signals.. 🤑💯
chat to join
➡️@Kevindexter✅️