TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #380 · 21 окт.

Регулярно приходится писать и ревьюить код, где используется PySide2-6. Заметил, что в подавляющем большинстве случаев настройка создаваемых базовых виджетов происходит через методы. Думаю, всем знаком такой способ. Простой пример с кнопкой: button = QPushButton("Click Me") button.setMinimumWidth(300) button.setFlat(True) button.setStyleSheet("font-size: 20pt") button.setToolTip("Super Button") button.clicked.connect(lambda: print("Button clicked")) Но есть и альтернативный способ - настройка через свойства. Это просто ключевые аргументы конструктора класса. Хоть они и не указаны в документации как аргументы, но они есть) Этот код делает тоже самое но с помощью Property button = QPushButton( "Click Me", minimumWidth=300, flat=True, styleSheet="font-size: 20pt", toolTip="Super Button", clicked=lambda: print("Button clicked"), ) Где это может быть полезно ▫️ Это выглядит более аккуратно и коротко, уже повод использовать ▫️ Может использоваться в заполнении лейаута, когда нам не нужно никакое другое взаимодействие с виджетом и поэтому сохранять его в переменную не требуется. Например, лейбл или кнопка. widget = QWidget(minimumWidth=400) layout = QHBoxLayout(widget) layout.addWidget(QLabel("Button >", alignment=Qt.AlignRight)) layout.addWidget(QPushButton("Click Me", clicked=lambda: print("Button clicked"))) widget.show() Либо так widget = QWidget(minimumWidth=400) layout = QHBoxLayout(widget) for wd in ( QLabel("Button >", alignment=Qt.AlignRight), QPushButton("Click Me", clicked=lambda: ...) ): layout.addWidget(wd) widget.show() ▫️ Можно хранить настройки в каком-то конфиге или генерировать на лету, после чего передавать как kwargs. kwargs = {"text": "Hello " * 30, "wordWrap": True} my_label = QLabel(**kwargs) Как получить полный список доступных свойств? Эта функция распечатает в терминал все свойства виджета и их текущие значения def print_widget_properties(widget): meta_object = widget.metaObject() for i in range(meta_object.propertyCount()): property_ = meta_object.property(i) property_name = property_.name() property_value = property_.read(widget) print(f"{property_name}: {property_value}") #tricks#qt

Hashtags

Резултати

Пронајдени 9 слични објави

Пребарај: #binarytrading

当前筛选 #binarytrading清除筛选
90% Binary Option Signals.

@realbinaryoptionss · Post #9210 · 10.04.2026 г., 13:13

📈Real Binary Options – Your Trusted Trading Partner 📈 🚀 Want to earn safe and consistent profits through Binary Options Trading? Join us today ➡️ @realbinaryoptionss ✅ Accurate Signals ✅ Professional Strategies ✅ Daily Market Updates ✅ Guidance for Beginners & Experts 💡 Start your trading journey with confidence and grow your income with us #BinaryTrading#ForexSignals#FinancialFreedom

90% Binary Option Signals.

@realbinaryoptionss · Post #8883 · 19.02.2026 г., 09:06

📈Real Binary Options – Your Trusted Trading Partner 📈 🚀 Want to earn safe and consistent profits through Binary Options Trading? Join us today ➡️ @realbinaryoptionss ✅ Accurate Signals ✅ Professional Strategies ✅ Daily Market Updates ✅ Guidance for Beginners & Experts 💡 Start your trading journey with confidence and grow your income with us #BinaryTrading#ForexSignals#FinancialFreedom

SS7 TRADER

@ss7trader · Post #30862 · 15.05.2026 г., 15:37

Best Non-Repaint Indicator 120-150+ Signals Daily with 80%+ Accuracy Ai Based Neural Networks Powered System for Binary Trading Working on Every Binary Broker! #nonrepaintindicator#highaccuracyindicator#binarytrading#pocketoption#quotex#pocketoptionindicator#quotexindicator#indicator#tradingindicator#ss7trader

SS7 TRADER

@ss7trader · Post #30835 · 13.05.2026 г., 17:36

Best Non-Repaint Indicator 120-150+ Signals Daily with 80%+ Accuracy Ai Based Neural Networks Powered System for Binary Trading Working on Every Binary Broker! #nonrepaintindicator#highaccuracyindicator#binarytrading#pocketoption#quotex#pocketoptionindicator#quotexindicator#indicator#tradingindicator#ss7trader

SS7 TRADER

@ss7trader · Post #30722 · 01.05.2026 г., 10:50

🟢 Market Update 🟢 🖤 Due to today’s EUR 🇪🇺, CNY 🇨🇳 & CHF 🇨🇭bank holidays, the market is highly volatile and unpredictable. After testing conditions, we decided to avoidunnecessaryrisk.✅ 🚫 No Live Stream Today 🚫 No Free Signals Today ✅ Quality Over Quantity 💎 Stay safe and profitable with SS7TRADERS 🚀 #BankHoliday#BankHolidayUpdates#ForexTrading#BinaryOptions#TradingSignals#RiskManagement#BinaryTrading

SS7 TRADER

@ss7trader · Post #30857 · 15.05.2026 г., 12:55

⚙100% NON-REPAINT. 0% GUESSING.⚙ 👉Look at these clean entries from today's session with Pro Thunder V12. Once the signal appears, it STAYS. No shifting, no disappearing, just pure accuracy. 👉Neural Network Logic: Our AI scans thousands of data points to find the highest probability reversal. 📈Result: See the screenshots for the clinical precision. Stop losing money on lagging indicators. It’s time to upgrade to the V12 standard.👑 👇 GET YOUR COPY NOW 👇 👉CLICK TO GET V12 NOW! #binarytrading#pocketoption#quotex#pocketoptionindicator#quotexindicator#indicator#tradingindicator#ss7trader#MT5#Indicators#binaryindicator#бинарныеопционы#бинарныеопционы#nonrepaintindicator#highaccuracyindicator#binarytrading#pocketoption#quotex#pocketoptionindicator#quotexindicator#indicator#tradingindicator#ss7trader

SS7 TRADER

@ss7trader · Post #30847 · 14.05.2026 г., 16:13

Next-gen Neural Network Indicator for Binary Trading. Non-repaint signals with 80%+ accuracy. 120-150+ setups daily. Works across all platforms including Pocket Option & Quotex. High-performance trading starts here. #binarytrading#pocketoption#quotex#pocketoptionindicator#quotexindicator#indicator#tradingindicator#ss7trader#MT5#Indicators#binaryindicator#бинарныеопционы#бинарныеопционы#nonrepaintindicator#highaccuracyindicator#binarytrading#pocketoption#quotex#pocketoptionindicator#quotexindicator#indicator#tradingindicator#ss7trader

SS7 TRADER

@ss7trader · Post #30864 · 15.05.2026 г., 17:06

🏆 🏆 🏆 Pro Thunder V12 Back-testing on EURUSD 23 April to 24 April | Real Time Results 13 Win - 3 Loss | 81% Win-rate #binarytrading#pocketoption#quotex#pocketoptionindicator#quotexindicator#indicator#tradingindicator#ss7trader#MT5#Indicators#binaryindicator#бинарныеопционы#бинарныеопционы#nonrepaintindicator#highaccuracyindicator#binarytrading#pocketoption#quotex#pocketoptionindicator#quotexindicator#indicator#tradingindicator#prothunderv12#backtesting#indicatorbacktesting#binaryindicatorbacktesting#indicatorbacktesting#ss7trader