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

Резултати

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

Пребарај: #institutional

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

@ethereumglobalnews · Post #1576 · 16.12.2025 г., 06:02

🪙 BULLISH SIGNAL Tom Lee 旗下 BitMine 再度大举加仓以太坊,上周新增 102,259 枚 ETH(约 3.21 亿美元),目前 ETH 总持仓已接近 400 万枚。 #Institutional#Crypto #Ethereum#Markets#以太坊 ——— ⚡️ 关键信号: • 传统资金持续在回调中布局 ETH • 机构级长期配置逻辑未变 • ETH 正逐步被视为 核心资产而非高风险投机品 👇Tip👇讚 或點擊上方🖲️進行搜索

DWF Labs Broadcast

@DWFLabs · Post #192 · 03.02.2023 г., 04:05

BIT x DWF Labs Crypto Snapshot [3 Feb] 📰 Highlights: 🔸#Bulls Cautiously Optimistic About #Bitcoin’s Price Movement 🔸 US Debt Measures Will Become Bitcoin’s Boom 🔸 Strong #Institutional Support For Bitcoin Indicates Future Rally Full read here.

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

@ethereumglobalnews · Post #1927 · 09.02.2026 г., 06:03

🐳⛏BitMine ETH Progress of strategic reserve 最新數據顯示,BitMine 已完成約 71% 的目標,正持續累積以達成持有全網 5% ETH 供應量的戰略。 ⚡️ 若該目標最終實現,將進一步強化機構級資金對以太坊供給端的長期鎖倉效應。 #Ethereum#以太坊#Institutional #Onchain#区块链#虚拟货币#币圈 ——— 👇⭐️👇 🤣留言分享觀點 🥲👇

Venture Village Wall 🦄

@venturevillagewall · Post #4352 · 10.03.2025 г., 13:00

Singapore Exchange Launches Bitcoin Futures 🔵 The Singapore Exchange (SGX) will launch perpetual Bitcoin futures by H2 2025, marking the first such product on a traditional Asian stock exchange. This move aims to attract major institutional players to the cryptocurrency market, expanding access and trading opportunities. 🔗 Read more: Bloomberg #Bitcoin#Crypto#SGX#Futures#Investment#Asia#Finance#Trading#Blockchain#DigitalAssets#Market#Institutional#PerpetualFutures#CryptoMarket

Venture Village Wall 🦄

@venturevillagewall · Post #4185 · 18.02.2025 г., 22:00

Massive ETH Transfer to Coinbase Institutional 🚨 21,772 #ETH ($57.8M) transferred from unknown wallet to Coinbase Institutional. Details: Whale Alert 🔥 56,492,765 #USDC burned at USDC Treasury. Details: Whale Alert 🇺🇸 Standard Chartered anticipates $1.1 trillion in sovereign wealth funds increasing #Bitcoin investments. More updates coming! #ETH#USDC#Bitcoin#WhaleAlert#Strategy#MSTR#Crypto#Finance#Investment#Market#SovereignWealthFunds#Trading#Ethereum#Institutional#News#Updates#VC#Blockchain

Venture Village Wall 🦄

@venturevillagewall · Post #3913 · 18.01.2025 г., 13:00

Bitcoin Predicted to Reach $200K by 2025 CryptoQuant analysts forecast Bitcoin may hit $200,000 by 2025. Driving factors include: ✔️ $520 billion institutional capital influx ✔️ Easing monetary policy and favorable crypto regulation ✔️ Historical price surges in the final year of four-year cycles. For more details, visit Forklog News. #Bitcoin#Crypto#Market#Analysis#Forecast#Investment#Institutional#Regulations#BullMarket#Trends#Finance#CryptoNews#Blockchain#Tech#Economy #2025 #Capital#Growth#QuantAnalysis#Traders#Volatility

Venture Village Wall 🦄

@venturevillagewall · Post #4126 · 11.02.2025 г., 22:00

BitGo Considers IPO in 2025 Crypto custodian BitGo Inc. is exploring an IPO, potentially listing in H2 2025 amid positive regulatory climate. The company raised $100 million in 2023, increasing its valuation to $1.75 billion. This move aligns with growing institutional interest in crypto. Read more: Bloomberg #Crypto#IPO#BitGo#Blockchain#Investment#MSTR#Profit#Custody#Regulation#Market#Financial#Valuation#Institutional#Assets#Saylor#Trading#News#Tech#Finance#VC

Venture Village Wall 🦄

@venturevillagewall · Post #3991 · 26.01.2025 г., 16:00

KTON Targets $6.12B Liquid Staking Market KTON, a liquid staking protocol by TONX, is set to launch V1 in February, aiming for a significant market expansion in the $6.12 billion liquid staking sector on TON. With Telegram's full support for TON, KTON plans to allow users to stake TON while earning KTON tokens, offering institutional-grade security. The project sees a potential growth from the current liquid staking market of $377 million to match Ethereum's levels, aiming for an 18-fold increase. KTON integrates with leading DEXs like Ethena and Curve Finance to provide flexible income strategies in the DeFi space. #KTON#TON#Staking#LiquidStaking#Blockchain#DeFi#Crypto#Institutional#Investment#Tech#Finance#Ethereum#Telegram#VC#MarketGrowth#Solana#TONX#Security#Innovation#Ecosystem

Venture Village Wall 🦄

@venturevillagewall · Post #3826 · 09.01.2025 г., 04:00

Binance Hits 250M Users, Record Stats Binance reports over 250 million registered users by year's end, a 47% increase. Platform processed 4.44M requests/second; VIP users up 116%, institutional users up 97%. Internal compliance team expanded to 650 experts. Read more US government clear to liquidate 69,000 Bitcoins (valued at $6.5B) seized from Silk Road. This follows a promise by the new administration not to sell the Bitcoins. Read more #Binance#Bitcoin#Crypto#Users#VIP#Institutional#Compliance#SilkRoad#Seizure#Finance#USGovernment#AnnualReport#MarketCap#Trading#Blockchain#Investments#Tech#DigitalCurrency#News

Venture Village Wall 🦄

@venturevillagewall · Post #4214 · 22.02.2025 г., 04:00

Bybit Under High Withdrawal Pressure MEXC transferred 12,652 stETH ($33.75M) to Bybit's cold wallet. Bybit expected 64,452 ETH ($170M) in loan support from Bitget. An additional transfer of 11,800 ETH ($31M) occurred from Binance. Following a recent hack, Bybit recorded peak withdrawal levels, surpassing 350,000 requests; 99.994% have been processed. Links: Porter Stansberry, Ben Zhou #Bybit#MEXC#stETH#ETH#Crypto#Binance#Bitget#Bitcoin#Withdrawals#Whale#Finance#Hack#Blockchain#Investments#Market#Institutional#Debt#Liquidity#Trading#Assets#VC

Venture Village Wall 🦄

@venturevillagewall · Post #4307 · 04.03.2025 г., 22:00

Crypto News Highlights: Market Moves & Updates 🚨 494,153 #SOL ($71.95M) transferred to Coinbase Institutional. 📉 SEC drops lawsuit against Cumberland DRW amid Trump admin crypto probe. 🇸🇻 El Salvador's President Bukele affirms ongoing Bitcoin purchases despite IMF's demands. ⚡ Belarus to boost cryptocurrency mining, leveraging excess electricity. 💰 BlackRock posits demand exceeds Bitcoin supply among US millionaires. Check for detailed insights: Whale Alert, SEC News, El Salvador Update, Belarus Mining #SOL#Crypto#SEC#Bitcoin#ElSalvador#Belarus#Mining#BlackRock#Finance#Blockchain#MarketUpdates#CryptoNews#WhaleAlert#IMF#Regulations#Energy#Millionaires#Demand#MarketMovements#Institutional#CryptoInvesting

Venture Village Wall 🦄

@venturevillagewall · Post #3813 · 07.01.2025 г., 16:00

Major USDC Burn & USDT Transfer News 🔥 50,000,000 #USDC burned at USDC Treasury. Full details here. 🚨 Nearly 500M #USDT transferred from #HTX to Tether Treasury, confirming strong liquidity movements. 🤑 MicroStrategy bought 258,320 BTC for over $22B in 2024, averaging $85,450 per BTC. Potential profit of $14B if BTC reaches $100,000. More info here. 🚀 Czech National Bank considers Bitcoin for reserve asset diversification. Details: link. 🔥 Total market cap for AI tokens approaches $17B, witnessing a 4% increase. Top tokens include #FET, #VIRTUAL, #AI16Z. 🔧 Solana developers aim to resolve scalability issues, targeting optimal performance as user base grows. Learn more here. 💡 Ripple partners with Chainlink to launch #RLUSD in DeFi, currently ranked 724 on CoinGecko with a market cap of $72.2M. 📉 Coinbase premium drops to a 12-month low, signaling potential short-term pressures for Bitcoin with analysts noting need for renewed institutional interest. More details here. #USDC#USDT#MicroStrategy#Bitcoin#Crypto#Ripple#Chainlink#AI#DeFi#Solana#CzechRepublic#Liquidity#MarketCap#Investing#Institutional#Trends#CryptoQuant#RLUSD#VIRTUAL#FET#AI16Z

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