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

Резултати

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

Пребарај: #lrc

当前筛选 #lrc清除筛选
Pro Analysis

@proanalysistrader · Post #28420 · 26.01.2025 г., 10:58

#LRC/USDT analysis : #LRC has retraced to the previous resistance zone, which is now acting as support for the price. From this level, bullish momentum is expected, with the previous swing high serving as the target level for upward movement. TF : 1D Entry : $0.1700 Target : $0.3338 SL : $0.1300

Hashtags

Pro Analysis

@proanalysistrader · Post #27721 · 02.07.2024 г., 05:30

#LRC/USDT analysis - #LRC is currently experiencing a downtrend and is trading below the 200-day Exponential Moving Average (EMA). The price is undergoing a pullback and is anticipated to test the resistance zone close to the 200 EMA shortly before potentially declining further to retest the previous lows. TF : 4h Entry : $0.1890 Target : $0.1601 SL : $0.1994

Hashtags

American Crypto©

@americancryptotrading · Post #27612 · 07.05.2026 г., 08:28

🇺🇸#LRC/USDT is consolidating near the lowerborder of the descendingchannel on the weekly timeframe🧐 A pump is expected if we bounce📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27584 · 10.04.2026 г., 09:22

🇺🇸#LRC/USDT has found support at the lowerborder of the descendingchannel formation on the weekly timeframe🔍 Further upside possible after bounce🐃 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27156 · 16.02.2025 г., 17:21

🇺🇸#LRC/USDT is bouncing from the lowerborder of the fallingwedge on the weekly timeframe🔍 Send it📈 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27110 · 05.01.2025 г., 17:51

🇺🇸#LRC/USDT has formed the descendingresistance line on the weekly chart👨‍💻 Looks good for the mid-term📈 American Crypto©

Hashtags

Binance crypto champions

@binancecryptochampions · Post #2942 · 11.12.2025 г., 07:06

✴️Free signal-Futures ✴️ ⚡️⚡️#LRC/USDT⚡️⚡️ Signal Type: Regular (Long) Leverage: Cross (20x) Margin: 2.0% Entry Targets: 1) 0.05500 2) 0.05900 Take-Profit Targets: 1) 0.06200 2) 0.06300 3) 0.06500 Stop Targets: 1) 0.05300 🍁 Published by: @Trading_exp🍁 Join_vip: @Crypto_Futures_Spot_Payment_bot

Hashtags

Crypto

@signal_bitcoins · Post #2813 · 15.02.2024 г., 08:55

#LRC has a symmetrical triangle pattern on Daily time frame,in the case of breakup we will see another huge pump again 🚀 ❄️@signals_bitcoin_crypto❄️ ❄️@Shadow_support0o❄️

Hashtags

Crypto

@signal_bitcoins · Post #2136 · 02.01.2024 г., 10:34

#LRC bounced back from the Demand zone also touched the curve on Weekly time frame,we need a bullish momentum to breakup this pattern 🚀 ❄️@signals_bitcoin_crypto❄️ ❄️@Shadow_support0o❄️

Hashtags

12
ПретходнаСтраница 1 од 2Следна