В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
#SPELL/USDT analysis :
#SPELL is currently in an uptrend, having demonstrated a rejection after testing the support zone. It is expected that the price will bounce back, resuming its bullish momentum and targeting higher price levels.
TF : 1D
Entry : $0.0010768
Target : $0.0020884
SL : $0.0008066
#SPELL/USDT analysis :
#SPELL has faced resistance at the 200 EMA and has broken below the trendline, indicating a continuation of its downtrend. The formation of lower lows (LLs) and lower highs (LHs) suggests this bearish trend is likely to persist until it reaches previous lows.
TF : 4h
Entry : $0.000740
Target : $0.000550
SL : $0.000865
#SPELL/USDT analysis :
#SPELL is currently in an uptrend, trading above the 200 EMA. The price is undergoing a corrective phase and is expected to test the support zone. A bounce from this level is anticipated, which would allow the price to continue its bullish momentum. It is advisable to wait for the price to retest and show signs of a bounce from the support zone before considering a long entry.
TF : 4H
Entry : $0.0007415
Target : $0.0009850
SL : $0.0006443
#SPELL/USDT analysis :
#SPELL has recently broken below the 200 EMA and previous support levels, and it has retested these levels. It is now likely to continue its bearish momentum and test the previous lows.
TF : 4h
Entry : $0.000537
Target : $0.000492
SL : $0.000561
#SPELL/USDT analysis :
#SPELL is trading in the resistance zone below the 200 EMA. It is expected that the price gonna face rejection at this level and continue moving downwards. It is advisable to wait for the price to break below the $0.000532 level for an entry.
TF : 2H
Entry : $0.000532
Target : $0.000455
SL : $0.000569
#SPELL LONG
📌Симпатично выглядит технически.
▪График слева - зеркальный уровень, мы видим как тестирует с обратной стороны несколько раз, кажется готовится прорыв.
▪График справа - готовится пробой контртрендовой линии, стоим у границы.
▪Вход: 0.000517$
▪Тейк: буду обновлять.
⚠️Cтоп: 0.00044(-14%)
пс: учитываем, что это альткоин... берем не больше 10% в сделку.
LINK - Maximus Trade|TWITTER