TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #381 · 23 окт.

Установить свойства виджета в PySide можно не только через соответствующие методы и конструктор класса. Можно их изменять с помощью метода setProperty по имени. btn = QPushButton("Click Me") btn.setProperty("flat", True) Это аналогично вызову btn.setFlat(True) Если указать несуществующее свойство, то оно просто создается btn.setProperty("btnType", "super") Получить его значение можно методом .property(name) btn_type = btn.property("btnType") Когда это может быть полезно? ▫️Можно просто хранить какие то данные в виджете и потом их доставать обратно widget = QWidget() widget.setProperty('my_data', 123) print(widget.property('my_data')) ▫️ Назначая эти свойства разным виджетам можно потом отличить виджеты во время итераци по ним. Например, найти все кнопки со свойством my_data="superbtn". Но ведь вместо кастомного свойства можно использовать objectName, будет тот же результат. Да, но y ObjectName есть ограничение - только строки. ▫️ Если нам потребуется не просто поиск а, например, сортировка по числу, то свойства позволяют нам это сделать. Поддерживается любой тип данных widget.setProperty('my_data', {'Key': 'value'}) widget.setProperty('order', 1) all_widgets.sort(key=w: w.property('order')) Но ведь Python позволяет всё вышеперечисленное сделать простым созданием атрибута у объекта widget.order = 1 widget.my_data = 123 Да, но я думаю что не надо объяснять почему не стоит так делать. К тому же, если у виджета нет свойства то метод .property(name) вернет None, а отсутствующий атрибут выбросит исключение. ▫️ Действительно полезное применение кастомным свойствам - контроль стилей. Здесь атрибутами не обойтись, нужны именно свойства. Дело в том, что в селекторах стилей можно указывать конкретные свойства виджетов на которые следует назначать стиль. Просто запустите этот код from PySide2.QtWidgets import * if __name__ == "__main__": app = QApplication([]) widget = QWidget(minimumWidth=300) layout = QVBoxLayout(widget) btn1 = QPushButton("Action 1") btn2 = QPushButton("Action 2") btn3 = QPushButton("Action 3", flat=True) layout.addWidget(btn1) layout.addWidget(btn2) layout.addWidget(btn3) # добавим кастомное свойство одной кнопке btn1.setProperty("btnType", "super") # добавляем стили widget.setStyleSheet( """ QPushButton[btnType="super"] { background-color: yellow; color: red; } QPushButton[flat="true"] { color: yellow; } """ ) widget.show() app.exec_() С помощью селектора мы избирательно назначили стили на конкретные кнопки. Как получить список всех кастомный свойств? Функция получения списка кастомных свойств отличается от получения дефолтных. def print_widget_dyn_properties(widget): for prop_name in widget.dynamicPropertyNames(): property_name = prop_name.data().decode() property_value = widget.property(property_name) print(f"{property_name}: {property_value}") #tricks#qt

Hashtags

Резултати

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

Пребарај: #arbitrum

当前筛选 #arbitrum清除筛选
Binance Alpha Airdrop Tracker

@BinanceAlphaAirdropTracker · Post #475 · 10.12.2025 г., 10:00

New Alpha Drop available 🎉 🪂 Airdrop: Lava Network 💎 Symbol: $LAVA 📅 Start: Wed, 10 Dec 2025 10:00:00 UTC ⏳ End: Thu, 11 Dec 2025 10:00:00 UTC 🎯 Threshold Priority/FCFS: 230/230 pts ⚖️ Deduct points: -15 pts 🎁 Airdrop: 165 $LAVA ($35) ⛓️ Chain: #ARBITRUM (42161) 📦 Contract: 0x11e969e9b3f89cb16d686a03cd8508c9fc0361af

Hashtags

Binance Alpha Airdrop Tracker

@BinanceAlphaAirdropTracker · Post #449 · 28.11.2025 г., 08:00

New Alpha Drop available 🎉 🪂 Airdrop: Vision 💎 Symbol: $VSN 📅 Start: Fri, 28 Nov 2025 08:00:00 UTC ⏳ End: Sat, 29 Nov 2025 08:00:00 UTC 🎯 Threshold Priority/FCFS: 252/252 pts ⚖️ Deduct points: -15 pts 🎁 Airdrop: 400 $VSN ($35) ⛓️ Chain: #ARBITRUM (42161) 📦 Contract: 0x6fbbbd8bfb1cd3986b1d05e7861a0f62f87db74b

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #173 · 19.04.2023 г., 03:53

High hope for another #Arbitrum hype still exists? Because we detect 2 whales that have just accumulated large amounts of $ARB: ✅ Whale 0x6b72 swapped 1.01M $USDT for 607,352 $ARB 4 hours ago. Average price: $1.66 ✅ Whale 0x0610 accumulated a total of 2.332M $ARB over the past 2 days. Average price: $1.68 👉 More details: https://twitter.com/spotonchain/status/1648532794103177217

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #141 · 01.04.2023 г., 02:34

🚨🚨2,693,961,178 $ARB (~$3.72B) were moved out of #Arbitrum vesting wallet 0x148440 and distributed to 145 addresses. Address 0x7ff89e received the most at 72,428,835 $ARB ($99.95M), now the 8th largest holder. The distribution process took place via middle wallet 0x1e7016. 4.17M $ARB (~$5.76M) remained undistributed in it. Addresses - Team ARB vesting contract: 0x148440E028565Db5f790fA3fbdbBcF0402A6a289 - Middle wallet: 0x1e7016f7c23859d097668c27b72c170ed7129a10 - Wallet the received the most: 0x7ff89e3c139a30fea7f0d0b079e0d17b95267137

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #139 · 31.03.2023 г., 07:16

This smart trader, who used to earn $671.6K from trading $GRAIL, started to touch on other #Arbitrum tokens: - 306.6K $JOE purchased at $0.59 (~$180K). Now staked and worth ~$195K. - 3.16M$RDNT amassed at $0.4 ($1.27M) from Mar 21-23. Now worth ~ $1.2M He once earned x2 his investment in $GRAIL by: ✅ Neatly accumulating 342 $GRAIL at only $1,815 (~$621.4K) during market downtime ✅ Sold all $GRAIL at an impressive price of $3,777 on Mar 22 when $GRAIL price surged due to the #Arbitrum airdrop 👉 More details: https://twitter.com/spotonchain/status/1641694153926144000

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #117 · 22.03.2023 г., 03:22

🚨🚨Arca has sold most of its #Arbitrum related tokens, maybe they are waiting for $ARB launch 🤔🤔 ➡️ Swapped 1.6M $RDNT to 712.78K USDT (sell at $0.445 vs buy at $0.274) 10 hours ago ➡️ Swapped 312,000 $SYN for 165.62 $ETH (~$267K) (sell at $0.8 vs buy at $1.21) 4 hours ago Currently, it clears all $DPX, $RDNT and still holds 20,198 $GMX ($1.6M) in staking and 548,779 $SYN ($510K) in two wallets Addresses: 0xa66f8Db3B8F1e4c79e52ac89Fec052811F4dbd19 0x23a5efe19aa966388e132077d733672cf5798c03

Hashtags

SpotOnChain | Announcement

@spotonchain · Post #73 · 02.03.2023 г., 12:01

🔥 VC Arca & traders seem to bet on #Arbitrum token $DPX too! 👉 Arca piled 1,881 $DPX from Feb 17 to 23 at $394 per $DPX (total cost $741.3K). 👉 Trader 0x2761 bought 1,867 $DPX on Mar 1 with 450 $ETH (~$741K) at $396.9 per $DPX. He once made $66.7K by trading $DPX before!

Hashtags

Airdrop Strikers™

@airdropstrikers · Post #1466 · 10.10.2023 г., 20:20

🎉Get ready for an exclusive $SBT Token airdrop!🌟 🤩 Suitbot is a trading bot operating on #ETH and #Arbitrum, aiming to simplify and enhance your DEFI experience. We will be distributing 1 million tokens to our active community celebrating our token launch! 🫡 Is really easy to participate‼️ 🤖 Use our bot to participate. 💬 Join our Telegram for details. 🔗 Telegram group: https://t.me/SuitBotPort 🔗 Twitter: https://twitter.com/SuitBot_TG Don't miss out on this opportunity! 🚀

SpotOnChain | Announcement

@spotonchain · Post #152 · 07.04.2023 г., 05:51

With the ongoing hype #Arbitrum narrative, $GMX has become 🔥 than ever before. Let us review some of the top $GMX activites lately! 1. Address 0x426fc1 ❗️ Re-amassed 12K $GMX using 526 $ETH (~$994K) on Apr 06 (18hrs ago) 2. Address 0x297903 ❗️ Amassed 4.5K $GMX since Mar 07 at $74.3 (~$335K); just got 1.2K $GMX from #Binance at $80.2 (~$100K) on Apr 05 💰 Current holding: 8.6K $GMX (~$677K) 3. Address 0xde32e5 ❗️ Amassed 61K $GMX at $76.6 (~$4.7M) on Apr 05 in mid wallet 0xdf42be -> Staked all 💰 Holds 108.7K $GMX (~$8.7M) -> expected profit of $400K 👉 More details: https://twitter.com/spotonchain/status/1644213451001327616

Airdrop Gold : Crypto Airdrop

@airdropgoldchannel · Post #158061 · 17.03.2026 г., 14:50

🚀 Just dropped my special Variational Invite Code: OMNIGOLD https://omni.variational.io/?ref=OMNIGOLD Use it → get Silver tier on Omni for 90 days instantly (better points multiplier + loss refund odds)! Zero-fee perps DEX on #Arbitrum. Farming $VAR #airdrop just got easier 🔥 Connect wallet & sign up now!

Airdrop3 LTD

@airdrop3ltd · Post #382 · 07.04.2023 г., 17:05

🪂#Airdrop event for #Arbitrum💙 🏃 First come first served 🏃 🏆 Airdrop Portal 👉https://arb-claim.kepler.homes?code=71D03A 💙 Invitation code: 71D03A A total of 550,000 addresses are eligible for #airdrop and 5 types of AirDropbox with different scarcity can be issued.

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