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

Резултати

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

Пребарај: #xvs

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

@CoinSonar · Post #243713 · 17.04.2026 г., 14:33

#XVS | Volume spike (USDT PAIR) 83 times the average volume 134.86K USDT traded in 15 min └Buying vol: 79.34K USDT 🟢 Boost score: 5/10 24h Vol: 154.69K USDT (Binance) Price: 3.30 (-2.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243630 · 17.04.2026 г., 12:15

#XVS | Volume spike (USDT PAIR) 79 times the average volume 128.29K USDT traded in 15 min └Selling vol: 64.97K USDT 🔴 Boost score: 1/10 24h Vol: 154.69K USDT (Binance) Price: 3.11 (-2.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243586 · 17.04.2026 г., 10:14

#XVS | Volume spike (USDT PAIR) 80 times the average volume 129.02K USDT traded in 15 min └Buying vol: 69.97K USDT 🟢 Boost score: 4/10 24h Vol: 154.69K USDT (Binance) Price: 2.96 (-2.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243522 · 17.04.2026 г., 08:00

#XVS | Volume spike (USDT PAIR) 1097 times the average volume 117.85K USDT traded in 1 min └Buying vol: 74.44K USDT 🟢 Boost score: 8/10 24h Vol: 154.69K USDT (Binance) Price: 2.76 (-2.2% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28469 · 13.02.2025 г., 16:42

#XVS/USDT analysis : #XVS has broken out above the 200 EMA and the previous swing high, exhibiting strong bullish momentum. The price is currently retracing and testing the support zone along with the 200 EMA. It is expected to retest this area and rebound, continuing its bullish momentum towards testing the swing high level. TF : 4H Entry : $7.60 Target : $9.33 SL : $6.84

Hashtags

Pro Analysis

@proanalysistrader · Post #28044 · 20.10.2024 г., 17:13

#XVS/USDT analysis : #XVS is in an uptrend, trading above the 200 EMA and consolidating over the support zone. The price is expected to bounce back from the support zone and test the previous highs. TF : 4H Entry : $7.42 Target : $8.05 SL : $7.00

Hashtags

Pro Analysis

@proanalysistrader · Post #27857 · 20.08.2024 г., 01:00

#XVS/USDT analysis : #XVS has recently broken out of the ascending triangle pattern on the LTF. Price is trading above the 200 EMA. It is expected to continue its bullish momentum and test previous swing highs. TF : 2H Entry : $6.98 Target : $7.59 SL : $6.64

Hashtags

Crypto Headlines

@market_headlines · Post #27722 · 16.03.2026 г., 06:49

#xvs 😭 Джастин Сан продал 621k XVS (Venus) за $1,95m с убытком ~$5,63m (-74%). В январе 2024 года основатель Tron купил эти токены за $7,58m. Ранее: атака на Venus Crypto Headlines

Hashtags

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