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 слични објави

Пребарај: #gtc

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

@CoinSonar · Post #244021 · 18.04.2026 г., 07:04

#GTC | Volume spike (USDT PAIR) 130 times the average volume 142.91K USDT traded in 15 min └Selling vol: 77.96K USDT 🔴 Boost score: 1/10 24h Vol: 104.82K USDT (Binance) Price: 0.100 (+1.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243969 · 18.04.2026 г., 04:49

#GTC | Volume spike (USDT PAIR) 296 times the average volume 107.93K USDT traded in 5 min └Buying vol: 61.28K USDT 🟢 Boost score: 4/10 24h Vol: 104.82K USDT (Binance) Price: 0.101 (+1.2% in 24h)

Hashtags

Coin Sonar

@CoinSonar · Post #243612 · 17.04.2026 г., 11:25

#GTC | Volume spike (USDT PAIR) 118 times the average volume 129.07K USDT traded in 15 min └Buying vol: 74.15K USDT 🟢 Boost score: 4/10 24h Vol: 104.82K USDT (Binance) Price: 0.099 (+1.2% in 24h)

Hashtags

Pro Analysis

@proanalysistrader · Post #28458 · 08.02.2025 г., 15:30

#GTC/USDT analysis : #GTC is currently retracing towards the 200 EMA, creating a potential long opportunity on lower time frames (LTF). The price has bounced back from the support zone and is anticipated to test higher levels. TF : 2h Entry : $0.418 Target : $0.469 SL : $0.385

Hashtags

Pro Analysis

@proanalysistrader · Post #28399 · 18.01.2025 г., 18:25

#GTC/USDT analysis : #GTC is currently in a downtrend, marked by a series of lower lows (LLs) and lower highs (LHs). The price is trading within a resistance zone, encountering significant resistance. Consequently, a continuation of the decline is anticipated from this level, with the price likely to test lower levels in the near future. TF : 4H Entry : $0.658 Target : $0.560 SL : $0.722

Hashtags

Pro Analysis

@proanalysistrader · Post #28075 · 27.10.2024 г., 12:23

#GTC/USDT analysis : #GTC has broken below support levels. The price is expected to continue falling and test lower levels, as the higher time frame (HTF) is bearish. Wait for the price to retest the zone before entering a short position. TF : 4h Entry : $0.644 Target : $0.596 SL : $0.678

Hashtags

Mexc Crypto Signals Pumps Trading Kucoin

@mexc_signals_pumps_trading · Post #1029 · 09.05.2024 г., 21:20

#GTC/USDT UPDATE: #GTC is now trading around 1.27$. #GTC has broken out a Inverse Head and shoulder pattern on hourly time frame. So the Possible scenario is According to the pattern, we can see short term bullish momentum in it and we can see the price pump 15-20%. Stay tuned with us for further updates✔️

Hashtags

Alex Kowalski | Trade

@kowalskitrade · Post #648 · 22.08.2024 г., 18:08

#GTC The coin looks very good, there is buying, there is reaction from the zones, waiting for further markup of the asset to cover the upper weekly imbalance 📈Sign up on Bybit to trade with me

Hashtags

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