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

Резултати

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

Пребарај: #tokenburn

当前筛选 #tokenburn清除筛选
SingSing Announcement

@singsingchannel · Post #1084 · 06.12.2024 г., 07:43

🔥Exciting Update!🔥 We’ve successfully burned nearly 200,000 $SING, reducing the circulating supply and driving the value of $SING to new heights! 🚀 💎Hold strong and secure your spot to enjoy exclusive benefits coming your way! Check out details: 1️⃣https://bscscan.com/tx/0x461c7cd24107ea082e79c7427961ae2c044cdd756f94cd1eca0faeac54d83db2 2️⃣https://bscscan.com/tx/0xaceebe720391408dd4613590d8436f07305bb83d0059992bdfe5e97860faa6f6 If you have not got $SING, easily buy at: - BingX: https://bingx.com/en/spot/SINGUSDT/ - CoinEx: https://www.coinex.com/en/exchange/sing-usdt - SingSing Mini App: https://t.me/SingSing_TG_bot/app?startapp=_wallet (guideline) #SING#TokenBurn

Crypto Fight || News 🚀

@cryptofightnews · Post #2684 · 01.05.2025 г., 18:10

Wondering why Van Kedisi Coin is catching eyes? Check the numbers: 🔥 914M tokens burned 💎 85M in circulation 🧠 No team unlock until $1B cap Ca: 66bHtzcXqmLgkn668EG4ETzHL3RLz5ybdckqvrPppump #VanKedisi#DeFi#TokenBurn https://t.me/vankedisicoin_chat https://x.com/vankedisicoin 🔣🔣🔣🔣🔣🔣🔣🔣🔣🔣🔣 💸Giveaway 5$❗️ 💎Join https://t.me/vankedisicoin_chat ▶️ Comment done below

SingSing Announcement

@singsingchannel · Post #1127 · 23.12.2024 г., 07:11

🔥 Another 121,343 $SING has been burned! 🔥 💨 Reducing supply, increasing value—step by step, we're building a stronger $SING ecosystem. ✔️Check out details: https://bscscan.com/tx/0xb3fac74c5744b68eee62ffa0efbdbe909ec4e719c2b644315a082c32a3aa9634 Stay tuned for more updates! 🚀 #SingSing#TokenBurn#Deflation

SingSing Announcement

@singsingchannel · Post #1099 · 12.12.2024 г., 10:54

🔥 Breaking News! Another 238,273 $SING has been burned, permanently removed from circulating supply! 🚀 💎 Reducing supply, increasing value — the journey to greater $SING potential continues! 🌟 Check out details here:https://bscscan.com/tx/0x79cd67fa0f249db0305743722bea3e1a68f3a62da74d586aa5f93faeff93d694 #TokenBurn#SingSing#DeflationaryEconomy

Airdrop Market Pro

@airdrop_market_pro · Post #390 · 11.12.2023 г., 20:07

We are thrilled to unveil our revamped pre-sale page, promising a lightning-fast and more animated experience! 🌐✨ But wait, there's more – we're introducing a game-changing feature to supercharge our token value: the Automatic Token Burn function! 🔥 In every pre-sale, when you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is crafted to reinforce our token's value, aiming to maintain 1 OBIT = $0.01. 📈💰 Join us on this exhilarating journey toward a stronger and more vibrant community! 🌟💪 🔗 Website: onebit.store 💸 Airdrop: onebit.store/airdrop/index.html 🚨 New Update: Purchase 10,000 OBIT for only 0.05 BNB – offer is limited! Plus, if you join without a referral, 25% of the purchased amount is burned from the total supply each time. 🔄 #CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀🌕 🌈 Embark on this journey with us and let's make history together! 🚀🚀🚀 https://www.youtube.com/shorts/S4iu3jA6Kac

Airdrop Market Pro

@airdrop_market_pro · Post #388 · 04.12.2023 г., 17:38

🚀 Exciting News! 🚀 Dear Friends, we have revamped our pre-sale page for a lightning-fast and more animated experience! 🌐✨ But that's not all – we've introduced a game-changing feature to boost our token value: the Automatic Token Burn function! 🔥 Now, in every pre-sale, if you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is designed to fortify our token's value and aims to keep 1 OBIT = $0.01. 📈💰 Join us in this exciting journey towards a stronger and more vibrant community! 🌟💪 Website: https://onebit.store/ Airdrop: https://onebit.store/airdrop/index.html #CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀

NFT & Airdrop News

@airdrop_nft1 · Post #385 · 11.12.2023 г., 20:07

We are thrilled to unveil our revamped pre-sale page, promising a lightning-fast and more animated experience! 🌐✨ But wait, there's more – we're introducing a game-changing feature to supercharge our token value: the Automatic Token Burn function! 🔥 In every pre-sale, when you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is crafted to reinforce our token's value, aiming to maintain 1 OBIT = $0.01. 📈💰 Join us on this exhilarating journey toward a stronger and more vibrant community! 🌟💪 🔗 Website: onebit.store 💸 Airdrop: onebit.store/airdrop/index.html 🚨 New Update: Purchase 10,000 OBIT for only 0.05 BNB – offer is limited! Plus, if you join without a referral, 25% of the purchased amount is burned from the total supply each time. 🔄 #CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀🌕 🌈 Embark on this journey with us and let's make history together! 🚀🚀🚀 https://www.youtube.com/shorts/S4iu3jA6Kac

NFT & Airdrop News

@airdrop_nft1 · Post #382 · 04.12.2023 г., 17:38

🚀 Exciting News! 🚀 Dear Friends, we have revamped our pre-sale page for a lightning-fast and more animated experience! 🌐✨ But that's not all – we've introduced a game-changing feature to boost our token value: the Automatic Token Burn function! 🔥 Now, in every pre-sale, if you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is designed to fortify our token's value and aims to keep 1 OBIT = $0.01. 📈💰 Join us in this exciting journey towards a stronger and more vibrant community! 🌟💪 Website: https://onebit.store/ Airdrop: https://onebit.store/airdrop/index.html #CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀

Free Airdrop News 🔥🔥🔥

@free_airdrop_nn · Post #214 · 11.12.2023 г., 20:06

We are thrilled to unveil our revamped pre-sale page, promising a lightning-fast and more animated experience! 🌐✨ But wait, there's more – we're introducing a game-changing feature to supercharge our token value: the Automatic Token Burn function! 🔥 In every pre-sale, when you make a purchase without referrals using any amount of BNB, that exact amount will be automatically burned from the total supply. 🔄 This strategic move is crafted to reinforce our token's value, aiming to maintain 1 OBIT = $0.01. 📈💰 Join us on this exhilarating journey toward a stronger and more vibrant community! 🌟💪 🔗 Website: onebit.store 💸 Airdrop: onebit.store/airdrop/index.html 🚨 New Update: Purchase 10,000 OBIT for only 0.05 BNB – offer is limited! Plus, if you join without a referral, 25% of the purchased amount is burned from the total supply each time. 🔄 #CryptoNews#TokenBurn#PresaleMagic#OBIT#ToTheMoon🚀🌕 🌈 Embark on this journey with us and let's make history together! 🚀🚀🚀 https://www.youtube.com/shorts/S4iu3jA6Kac

SingSing Announcement

@singsingchannel · Post #1145 · 27.12.2024 г., 10:50

🔥 Breaking News: We just burned over 1,000,000 $SING tokens! This move reinforces our commitment to boosting $SING's valuealongside the groundbreaking innovations we're building for the SingSing community. 🚀 🔮 Here's a sneak peek: Revolutionary AI coming to SingSing will forever change the face of gaming. Stay tuned! Check out burning details: https://bscscan.com/tx/0x46ec5084869ae42ca73c1769deaba4fa952c5f790338be54ad415102b3a05c51 #SingSingAI#TokenBurn#NextGenGaming#BlockchainInnovation