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

Резултати

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

Пребарај: #cryptoanalysis

当前筛选 #cryptoanalysis清除筛选
以太坊区块链新闻| ETH 以太币圈热瓜

@ethereumglobalnews · Post #1189 · 24.10.2025 г., 05:45

🖼 Trending now: #BTC - Liquidity clusters hint at potential volatility ahead. #Markets#CryptoAnalysis 📊👀 比特幣主要流動性集中區仍位於上方區域,但在 $104,000–$106,000 區間也出現顯著流動性集群。 由於市場尚未展現明確反彈動能,價格或將先下探以清掃下方流動性,隨後再出現反轉。 #Insight @EthereumGlobalNews Follow for more global Web3 & DeFi updates!

Bitcoin Exchange Reserve Analysis: Exchange reserve dropped from 1.9M BTC in 2022 to below 1.1M BTC in 2025. Inverse correlation with price: as reserve decreases, price increases, peaking at $69.7K. Indicates long-term holding and bullish sentiment. What's your take on future movements? #Bitcoin#CryptoAnalysis#MarketTrends

SLEX NEWS

@slex_io · Post #45 · 24.05.2023 г., 19:22

📊 Poll Time! We want to know: What tools do you use to analyze the market? Cast your vote and let us know! #CryptoAnalysis Vote now here : https://t.ly/2lIs or by replying with the corresponding option number or share your favorite analysis tool in the comments 🔍 Technical Analysis Software 💹 Candlestick Charts 📈 Fundamental Analysis Reports 📊 Market Data Aggregators #Slex#SlexIO 2 days 23 hours left before the poll closes

以太坊区块链新闻| ETH 以太币圈热瓜

@ethereumglobalnews · Post #1527 · 09.12.2025 г., 09:28

😱🤑 Fear & Greed Index Update #ETH 情緒:Fear(37) #以太坊#市场情绪#虚拟货币 #CryptoAnalysis#FearAndGreed ——— 已反彈至恐懼情緒不建議今天瞎雞巴操作❗️#Insight ✅Chat: @Web3NewsInsight 🦂 👇Tip👇讚 或點擊進行💎資源搜索👇

Crypto & Gifts NEWS

@serbadgernews · Post #3033 · 22.12.2025 г., 04:58

#Daily_New_Token_Analysis📊 Token: $JUPSOL/USDT ### 1. Resistance & Support 🔧 JUPSOL tracks staked SOL price with premium, consolidating in range amid Solana market pullback. - Resistance: $167.5 (recent high) 💪, $193.3 (prior peak) 🌟 - Support: $140 (volume cluster) ### 2. Next Possible Moves 🔮 - Bullish (~15%): Break $160 targets $180 short-term 🚀. - Bearish (~20%): Drop below $140 eyes $120 📉. - Bias: Neutral short, bullish medium 🎢. Watch BTC! ### 3. On-Chain Whale Activity 🐳 - Accumulation: Multiple whales bought $300K+ JUPSOL recently 💰 - Net Flow: + large inflows to staking positions 📊 ### 4. Upcoming Token Unlock 🔒 None: Liquid staking token, no vesting unlocks 🔓 ### 5. News / Partnerships 📰 Sanctum Infinity integration for better liquidity 🌐; SOL debit card partnership 🎉 *Attached chart! DYOR 🚀#JUPSOL#CryptoAnalysis*

Crypto Pumps Signals

@trading_signals8 · Post #1201 · 06.06.2024 г., 10:58

Bitcoin Technical Analysis Update 🔝 Hello Crypto Enthusiasts! ⭐️ We're thrilled to announce that Bitcoin has just reached $71,000! 📈This milestone indicates we're on the verge of retesting the All-Time High (ATH) once again. Current Price Action ✔️Resistance: Primary resistance is at the previous ATH of $72,000. Breaking this could propel Bitcoin higher. ✔️Support: Strong support is at $68,000. ✔️Moving Averages: The 50-day MA is trending upwards at $65,000, and the 200-day MA supports at $60,000. Technical Indicators ✔️RSI: At 70, indicating bullish sentiment but nearing overbought territory. ✔️MACD: Well above the signal line, confirming a strong bullish trend. ✔️Volume: Increasing, signaling robust market participation. Positive Predictions 1. Retesting ATH: Bitcoin is poised to challenge and potentially break $72,000. 2. Institutional Interest: Major players are increasing investments. 3. Global Adoption: Increasing adoption by countries and corporations. 4. Technical Upgrades: Upcoming upgrades to improve scalability and efficiency. 5. Bull Market Cycle: Analysts predict potential targets ranging from $80,000 to $100,000 in the coming months. Conclusion Bitcoin is buzzing with excitement as we approach new highs. Strong indicators, institutional interest, and global adoption signal a positive outlook. Stay tuned for more updates and prepare for an exhilarating ride to new heights! Stay Informed Join our Telegram channel for real-time updates, expert analysis, and to be part of a thriving crypto community. Let's capitalize on the incredible opportunities ahead! 🚀💰📈#Bitcoin#BTC#Crypto#BullMarket#ATH#CryptoAnalysis

DigitalGenie Trading News

@digitalgentop · Post #241 · 06.06.2024 г., 08:02

⚡️Main news: 🔗Wallet on Telegram enforces new KYC rules, switches provider 🟢 PEPE whale up nearly $5M on investment within a month 💵Next $1 trillion company will be DePIN 📌 Alex Labs rolls out post-exploit recovery plan 💰Bitcoin in 42-day ‘boredom zone’ — traders debate next move #Cryptoanalysis #Cryptoenthusiast #Cryptocurrencies #Cryptowallet

DigitalGenie Trading News

@digitalgentop · Post #224 · 02.06.2024 г., 16:01

☄️ZKasino gives investors 72-hour window to get back deposited ETH 💵ZKasino denied it tried to make off with $33 million of investor funds in April and has now opened up a short refund window. #Cryptoanalysis #Cryptoenthusiast #Cryptocurrencies #Cryptowallet

Crypto M - Crypto News

@CryptoM · Post #65021 · 10.04.2026 г., 14:11

🚀 Bitcoin's Potential Bear-Market 'Iron Bottom' Predicted by Analyst A CryptoQuant analyst has projected that Bitcoin might establish a bear-market 'iron bottom' within the $55,000–$60,000 range by the end of 2026. According to NS3.AI, this prediction is grounded in on-chain indicators, notably the MVRV Z-score, which has moderated but remains above negative levels. #Bitcoin#Crypto#BearMarket#CryptoAnalysis#MVRV#OnChainData#CryptoPredictions#BTC

Crypto M - Crypto News

@CryptoM · Post #64864 · 10.04.2026 г., 05:16

🚀 Experts Highlight Key Bitcoin Price Levels for Altcoin Bullishness Bitcoin's price movement is under scrutiny as experts outline critical levels for potential market shifts. According to NS3.AI, Alex Kuptsikevich emphasized that Bitcoin must surpass $75,000 to trigger a bullish trend in altcoins, following multiple unsuccessful attempts to break out of the $70,000–$73,000 range. In a separate analysis, Mike Novogratz noted that Bitcoin needs to establish a stable position at $74,000 to pave the way for a breakthrough beyond $80,000. #Bitcoin#Altcoins#BullishTrend#MarketShifts#CryptoAnalysis#PriceLevels#BitcoinPrice#Cryptocurrency#BTC

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