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

Резултати

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

Пребарај: #dash

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

@CoinSonar · Post #244150 · 18.04.2026 г., 11:39

#DASH | Volume spike (USDT PAIR) 63 times the average volume 131.74K USDT traded in 1 min └Selling vol: 89.64K USDT 🔴 Boost score: 1/10 24h Vol: 3.01M USDT (Binance) Price: 35.21 (-2.6% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #244090 · 18.04.2026 г., 09:09

#DASH | Volume spike (USDT PAIR) 10 times the average volume 313.67K USDT traded in 15 min └Selling vol: 246.49K USDT 🔴 Boost score: 1/10 24h Vol: 3.01M USDT (Binance) Price: 36.32 (-2.6% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243804 · 17.04.2026 г., 18:09

#DASH | Volume spike (USDT PAIR) 72 times the average volume 152.34K USDT traded in 1 min └Selling vol: 138.78K USDT 🔴 Boost score: 1/10 24h Vol: 3.01M USDT (Binance) Price: 36.98 (-2.6% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243665 · 17.04.2026 г., 13:17

#DASH | Volume spike (USDT PAIR) 9 times the average volume 303.11K USDT traded in 15 min └Buying vol: 190.56K USDT 🟢 Boost score: 6/10 24h Vol: 3.01M USDT (Binance) Price: 37.42 (-2.6% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243403 · 17.04.2026 г., 01:38

#DASH | Volume spike (USDT PAIR) 69 times the average volume 145.21K USDT traded in 1 min └Buying vol: 144.12K USDT 🟢 Boost score: 8/10 24h Vol: 3.01M USDT (Binance) Price: 37.07 (-2.6% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243283 · 16.04.2026 г., 19:05

#DASH | Volume spike (USDT PAIR) 10 times the average volume 314.96K USDT traded in 15 min └Selling vol: 185.85K USDT 🔴 Boost score: 1/10 24h Vol: 3.01M USDT (Binance) Price: 37.65 (-2.6% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28435 · 30.01.2025 г., 15:49

#DASH/USDT analysis : #DASH has successfully broken out and retested the previously respected resistance zone. The price is expected to rebound from the current level and aim for previous swing highs. For a long entry, it is advisable to wait for a breakout above the $36.13 level. TF : 1D Entry : $36.13 Target : $65.69 SL : $29.25

Hashtags

Pro Analysis

@proanalysistrader · Post #28338 · 13.12.2024 г., 13:36

#DASH/USDT analysis : #DASH has broken out of the trendline following a bounce back from the 200 EMA. The price is anticipated to resume its bullish momentum and test previous highs. TF : 4H Entry : $48.5 Target : $71 SL : $39.8

Hashtags

American Crypto©

@americancryptotrading · Post #27521 · 01.02.2026 г., 11:13

🇺🇸#DASH/USDT is stabilizing near the broken fallingwedge formation on the weekly chart🔥 Time to rise🐃 American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27478 · 23.12.2025 г., 09:34

🇺🇸#DASH/USDT is retesting the broken s/rzone on the weekly timeframe👨‍💻 Bullish case if we bounce📈 American Crypto©

Hashtags

123•••89
ПретходнаСтраница 1 од 9Следна