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

Резултати

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

Пребарај: #token

当前筛选 #token清除筛选
American Crypto©

@americancryptotrading · Post #27367 · 07.09.2025 г., 08:42

🇺🇸#TOKEN/USDT is testing the supportzone on the daily chart💁‍♂️ Strong upside potential on a bounce✈️ American Crypto©

Hashtags

American Crypto©

@americancryptotrading · Post #27150 · 10.02.2025 г., 12:47

🇺🇸#TOKEN/USDT is bouncing from the supportzone on the 3D timeframe🧐 Looking for a rise🐃 American Crypto©

Hashtags

Airdrop Presents 🗽

@airdrop_presents · Post #2082 · 07.12.2022 г., 16:52

🪂New airdrop: Smart Link Solution (SLS) 💰 Reward: 100,000 #token ($15,000) prize pool 👥 Referral: +1 Entries 🕰 Distribution: 1st January, 2023 🔗Airdrop Link:https://wn.nr/fgmdnH -Complete all tasks of the airdrop -Complete all tasks of the airdrop Done ✅Done✅Done✅Done✅ ⚠️Please remember: Only participate in completely free airdrops, never spend any penny for airdrop tokens

Hashtags

Airdrop Presents 🗽

@airdrop_presents · Post #1652 · 01.07.2022 г., 14:14

💧Airdrop : Naga Alpha Test💧 📣Complete Task: ➕ $5000 - IDO #token Price $0.01 📊Referral : 50 Top referrers will jave a whitelist details. 🏆Winners: 250 Player Lucky random have gift token, Nft game up to 5000$ 📅End date: 3th July 2022 💎Ratings: ⭐️⭐️⭐️ 🔛Naga Alpha Airdrop For Click 🔛 🌀 Follow Naga Alpha on Twitter and retweet the pinned post. 🌀 Follow Naga Alpha on Facebook 🌀 Enter Your Gmail 🌀 Submit Bep-20 address 📡 Enter your information to the airdrop bot. 🗞Note: All airdrop steps should be completed. 👨‍💼Business Inquiry: Admin || Admin2

Hashtags

Crypto GALAXY

@crypto_galaxy_signals · Post #1490 · 17.05.2024 г., 10:10

Coin: #TOKEN/USDT Direction: LONG Leverage: 10x - Cross - TAKE-PROFIT: 1 - 0,09847 ✔️ 2 - 0,10042 ✔️ 3 - 0,10237 ✔️ 4 - 0,10725 ✔️ 🔥 Profit: 101.69% 🔥 VIP 👉t.me/cryptoxadmin

Hashtags

SingSing Announcement

@singsingchannel · Post #958 · 03.11.2024 г., 00:32

We're eagerly counting down to Nov 11 for the IDO of the $SING token! Check out this handy $SING #token IDO Cheat Sheet below for all the essential info you need to know👇 🔸Total Supply: 2.4B 🔸IDO Price: $0.018 🔸Allocation: 11.11M (0.46% Total Supply) 🔸IDO Date: Nov 11, 2024 🔸Network: BSC, ARB, POLYGON 🔸Currency: USDT 🔸Terms: 20% at TGE, then linearly monthly vesting for the next 6 months 🔸LaunchPad:@Kommunitas - details 🎤Announcement | Chat | X (Twitter) | Website | Game

Hashtags

SingSing Announcement

@singsingchannel · Post #942 · 28.10.2024 г., 13:31

🎉 Exciting Announcement! 🎉 Mark your calendars for Nov 11, 2024,when the $SING Token Sale begins on the @Kommunitas launchpad! 🔗 Check out the project on Kommunitas platform here: https://launchpad.kommunitas.net/pool/SING/PublicCross 🧵 Dive into the X thread for essential details about the upcoming #token sale! 🎤Announcement | Chat | X (Twitter) | Website | Game

Hashtags

Venom Foundation Official

@venomfoundationofficial · Post #5 · 14.10.2022 г., 07:35

Venom Foundation explicitly states that by any means not going to do any kind of a #token pre-sale (private or public) or any other form of equity allocation. More in our statement ➡️ https://medium.com/@venom.foundation/mportant-venom-foundation-does-not-distribute-venom-utility-tokens-prior-to-the-official-launch-b3ffe84326f9

Hashtags

TONlines – News

@tonlines · Post #7253 · 17.05.2025 г., 16:26

⚡️Gatto Official Channel: Major Milestone with GTON Token Burn #GTON#token The Gatto Official Channel announces that the total burn of $GTON tokens has reached 1,000,000, effectively removing 5% of the supply from circulation. This community-driven effort strengthens the token's value and stability. Source: link @tonlines

Hashtags

TONlines – News

@tonlines · Post #7683 · 02.12.2025 г., 15:03

Gatto Official Channel: December Staking Begins #staking#token The Gatto Official Channel announces the start of the December staking period after taking the first snapshot of game balances. Staking will conclude on December 29th, and token holders should maintain their balances to receive rewards. Balance cuts will occur randomly each day. Source: link @tonlines

123•••67
ПретходнаСтраница 1 од 7Следна