В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
💰$216 million paid out by prop firms. And yet most traders fail before placing a single trade.
Not because of bad strategy. Because they picked the wrong firm.
Ian Coleman (FXStreet) is taking on a $100K prop challenge live, and episode 1 is all about the decision most people rush: who actually deserves your money?
Spoiler: the prop space is a minefield right now.
📌 Hidden drawdown traps
📌 Weekend holding rules that kill swing traders
📌 Unregulated providers that look legit until they aren't
He used Propinder to filter thousands of options down to one. Watch how he did it before you touch a challenge yourself.
👉https://www.youtube.com/watch?v=hHQvuPN2uYY
#PropTrading#FTMO#TradingChallenge
💰$216 million paid out by prop firms. And yet most traders fail before placing a single trade.
Not because of bad strategy. Because they picked the wrong firm.
Ian Coleman (FXStreet) is taking on a $100K prop challenge live, and episode 1 is all about the decision most people rush: who actually deserves your money?
Spoiler: the prop space is a minefield right now.
📌 Hidden drawdown traps
📌 Weekend holding rules that kill swing traders
📌 Unregulated providers that look legit until they aren't
He used Propinder to filter thousands of options down to one. Watch how he did it before you touch a challenge yourself.
👉https://www.youtube.com/watch?v=hHQvuPN2uYY
#PropTrading#FTMO#TradingChallenge
Most traders don't blow prop challenges because of bad strategy.🧠
They blow them because of what happens up here.
48 hours into a $100K challenge, I nearly did the exact thing I tell everyone to avoid.
There's a moment called the Death Zone. 80-90% of traders hit it and fall apart. Not because they're bad. Because the pressure tricks them.
I have a $10 fix that changes everything. Sounds weird.Stick with me. 👇
https://www.youtube.com/watch?v=TdCDEaU-vbc
Part 3 of the Prop Trading Series is live on FXStreet.
#PropTrading#TradingPsychology#TradingChallenge
Day 1 Progress Using Pro Thunder V12 Indicator and Achieved Almost Our Half of Our Target and We Are now at Global 46th Number Rank Position. #Day1#TradingChallenge#ProThunderV12#IQOption
Just started on IQ Option for the day! Current worldwide rank is 103, but the goal is to hit the Top 10 by the end of the week. 🚀
Let's see if the Pro Thunder V12 can get us there. It’s going to be an interesting climb—stay tuned!🔥
#DAY1#IQOption#TradingChallenge#TOP10#ProThunderV12