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

Резултати

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

Пребарај: #pyr

当前筛选 #pyr清除筛选
Coin Sonar

@CoinSonar · Post #244030 · 18.04.2026 г., 07:18

#PYR | Volume spike (USDT PAIR) 19 times the average volume 128.31K USDT traded in 15 min └Buying vol: 80.26K USDT 🟢 Boost score: 4/10 24h Vol: 627.61K USDT (Binance) Price: 0.313 (-2.1% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243888 · 18.04.2026 г., 00:11

#PYR | Volume spike (USDT PAIR) 52 times the average volume 114.16K USDT traded in 5 min └Buying vol: 85.44K USDT 🟢 Boost score: 7/10 24h Vol: 627.61K USDT (Binance) Price: 0.316 (-2.1% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243853 · 17.04.2026 г., 22:10

#PYR | Volume spike (USDT PAIR) 50 times the average volume 110.23K USDT traded in 5 min └Buying vol: 61.91K USDT 🟢 Boost score: 4/10 24h Vol: 627.61K USDT (Binance) Price: 0.303 (-2.1% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243814 · 17.04.2026 г., 18:56

#PYR | Volume spike (USDT PAIR) 49 times the average volume 107.53K USDT traded in 5 min └Buying vol: 88.98K USDT 🟢 Boost score: 7/10 24h Vol: 627.61K USDT (Binance) Price: 0.291 (-2.1% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28318 · 06.12.2024 г., 08:09

#PYR/USDT analysis : #PYR is currently in an uptrend, forming a higher highs (HHs) and higher lows (HLs) structure. At present, the price is undergoing a correction phase, with expectations of a breakout from the trendline soon, which will allow it to resume its bullish momentum. Wait for a break above the $4.320 level as a signal to enter long positions. TF : 1h Entry : $4.320 Target : $4.845 SL : $3.969

Hashtags

Pro Analysis

@proanalysistrader · Post #27909 · 07.09.2024 г., 06:09

#PYR/USDT analysis : #PYR is in a downtrend, forming lower lows (LLs) and lower highs (LHs) structure. The price is currently trading below the 200 Exponential Moving Average (EMA). It is anticipated that the price will retrace back to the resistance zone and then reverse from there to continue its bearish momentum and test the previous swing low. TF : 30min Entry : $2.438 Target : $2.299 SL : $2.495

Hashtags

American Crypto©

@americancryptotrading · Post #27224 · 20.04.2025 г., 14:23

🇺🇸#PYR/USDT is poised to breakout from the descendingresistance line on the daily chart💁‍♂️ Pump is expected🚀 American Crypto©

Hashtags

Crypto Profit Coach™

@cryptoprofitcoach · Post #8307 · 03.10.2022 г., 14:46

#PYR https://www.binance.com/en/trade/PYR_BTC Buying Zone 1850-1868 We are expecting ride in this Coin 🚀🚀🚀🚀 Buy in parts and Strictly follow as directed 👆 Sell 🤑 2000-2050 🤑 2050- 2250 🤑 2250- 2400 🚀 2400- 2600 & above Exit/Re-Entry point- 1800

Hashtags

Binance Big Pump Signals Future trade

@binancebigpumpsignalsfuture · Post #1972 · 13.01.2022 г., 13:26

#PYR result 2 nd target achieved in just 5 days ✅✅ One more huge quick profit 22.4%🤑💰🤑 👉 Still thinking? The more you wait more you lose profit ☎️ Contact @MichaelStrategiesVip for membership and grab next breakout signal

Hashtags

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