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 слични објави

Пребарај: #mewusdt

当前筛选 #mewusdt清除筛选
Propheta Indicator Signals

@propheta_indicator · Post #23177 · 09.12.2025 г., 15:51

⭐️ Long | Entry: 0.001158 Symbol: #MEWUSDT - Binance futures link — 📤 Signal details — TP 1️⃣: 0.001164 TP 2️⃣: 0.00117 TP 3️⃣: 0.001175 TP 4️⃣: 0.001181 TP 5️⃣: 0.001193 TP 6️⃣: 0.001204 TP 7️⃣: 0.001216 TP 8️⃣: 0.001227 TP 9️⃣: 0.001251 ⛔️ Stop loss: 0.0011 🏦 Leverage: at your discretion 💰 Entry percentage: 1-5% 👆 Here's a signal from the VIP HTL channel!

Hashtags

Propheta Indicator Signals

@propheta_indicator · Post #23168 · 07.12.2025 г., 00:58

⭐️ Long | Entry: 0.001163 Symbol: #MEWUSDT - Binance futures link — 📤 Signal details — TP 1️⃣: 0.001169 TP 2️⃣: 0.001175 TP 3️⃣: 0.00118 TP 4️⃣: 0.001186 TP 5️⃣: 0.001198 TP 6️⃣: 0.00121 TP 7️⃣: 0.001221 TP 8️⃣: 0.001233 TP 9️⃣: 0.001256 ⛔️ Stop loss: 0.001105 🏦 Leverage: at your discretion 💰 Entry percentage: 1-5% 👆 Here's a signal from the VIP HTL channel!

Hashtags

Propheta Indicator Signals

@propheta_indicator · Post #23153 · 04.12.2025 г., 14:35

⭐️ Short | Entry: 0.001149 Symbol: #MEWUSDT - Binance futures link — 📤 Signal details — TP 1️⃣: 0.001143 TP 2️⃣: 0.001138 TP 3️⃣: 0.001132 TP 4️⃣: 0.001126 TP 5️⃣: 0.001115 TP 6️⃣: 0.001103 TP 7️⃣: 0.001092 TP 8️⃣: 0.00108 TP 9️⃣: 0.001057 ⛔️ Stop loss: 0.001206 🏦 Leverage: at your discretion 💰 Entry percentage: 1-5% 👆 Check out this VIP HTL Signal! 🔥🔥🔥

Hashtags

Propheta Indicator Signals

@propheta_indicator · Post #23120 · 29.11.2025 г., 08:31

⭐️ Short | Entry: 0.001192 Symbol: #MEWUSDT - Binance futures link — 📤 Signal details — TP 1️⃣: 0.001186 TP 2️⃣: 0.00118 TP 3️⃣: 0.001174 TP 4️⃣: 0.001168 TP 5️⃣: 0.001156 TP 6️⃣: 0.001144 TP 7️⃣: 0.001132 TP 8️⃣: 0.00112 TP 9️⃣: 0.001097 ⛔️ Stop loss: 0.001252 🏦 Leverage: at your discretion 💰 Entry percentage: 1-5% 👆 Check out this VIP HTL Signal! 🔥🔥🔥

Hashtags

Propheta Indicator Signals

@propheta_indicator · Post #23095 · 24.11.2025 г., 16:27

⭐️ Long | Entry: 0.001164 Symbol: #MEWUSDT - Binance futures link — 📤 Signal details — TP 1️⃣: 0.00117 TP 2️⃣: 0.001176 TP 3️⃣: 0.001181 TP 4️⃣: 0.001187 TP 5️⃣: 0.001199 TP 6️⃣: 0.001211 TP 7️⃣: 0.001222 TP 8️⃣: 0.001234 TP 9️⃣: 0.001257 ⛔️ Stop loss: 0.001106 🏦 Leverage: at your discretion 💰 Entry percentage: 1-5% 👆 Check out this VIP HTL Signal! 🔥🔥🔥

Hashtags

Propheta Indicator Signals

@propheta_indicator · Post #23032 · 08.11.2025 г., 02:45

👍 This is why we're here! #MEWUSDT has achieved 9th TP in 10 hours in our VIP HTL channel! ACCESS TO MANUAL TRADING for 70usdt/month 👉 Did you know that many traders use our performance reports to build their own trading strategy? That's how useful they are! Check them out: @propheta_reports Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #cryptobot#tradingview#buycrypto

Propheta Indicator Signals

@propheta_indicator · Post #23113 · 27.11.2025 г., 02:10

Oops, we did it again 🤣 #MEWUSDT has reached 9th TP in the VIP HTL signals channel!👍 That's why we call it the "Money Printer" 💴💷💵ACCESS TO MANUAL TRADING for 70usdt/month 👉 Love the profits you're seeing, but can't afford the VIP cost? Earn over $40 per one recommendation with zero risk using our referral program! Click the link, then START >>> Referral Program Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #bitcoin#AItrade#trading

Propheta Indicator Signals

@propheta_indicator · Post #23456 · 13.03.2026 г., 10:30

Oops, we did it again 🤣 #MEWUSDT has achieved 9th TP in our VIP PRO channel! 🤑 All this profit could have been yours! 🔥ACCESS TO MANUAL TRADING for 70usdt/month 👉 We ain't only bragging about those profits, we're publishing the most transparent performance reports you can personally audit! Come and see for yourself: @propheta_reports Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #signalchannel#AItrading#btc

Propheta Indicator Signals

@propheta_indicator · Post #23219 · 18.12.2025 г., 20:44

👆 OMG! Would you look at that 👀 #MEWUSDT has reached 9th TP in the VIP HTL signals channel!👍 Easy $203 with a 5% entry and a $1000 deposit! VIPs getting filthy rich by the day ☺️🤑🤑ACCESS TO MANUAL TRADING for 70usdt/month 👉 Multiplying deposits every day! Not convinced? Contact us for a free trial - @propheta_help Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #cryptobot#tradingview#indicator

Propheta Indicator Signals

@propheta_indicator · Post #23201 · 15.12.2025 г., 16:46

👆 Propheta living up to its name yet again 🔮 #MEWUSDT reached 9th TP! Signal from our VIP HTL channel! With a 5% entry and a $1000 deposit, you could've earned $203! 🤑 All this profit could have been yours! 🔥ACCESS TO MANUAL TRADING for 70usdt/month 👉 Did you know that many traders use our performance reports to build their own trading strategy? That's how useful they are! Check them out: @propheta_reports Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #indicator#tradingindicator#signalchannel

Propheta Indicator Signals

@propheta_indicator · Post #23191 · 12.12.2025 г., 17:59

👍 This is why we're here! #MEWUSDT has achieved 9th TP in our VIP HTL channel! Easy $205 with a 5% entry and a $1000 deposit! Every day we're on fire! 🔥🔥🔥ACCESS TO MANUAL TRADING for 70usdt/month 👉 Get dozens of signals like these daily! Subscribe now >>> t.me/ProphetaAdmin_bot Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #tradingbot#AItrade#eth

Propheta Indicator Signals

@propheta_indicator · Post #23247 · 28.12.2025 г., 11:38

👆 OMG! Would you look at that 👀 Reached 9th TP on our #MEWUSDT trade! 🔥🔥🔥 You could've earned $204 with a 5% entry and a $1000 deposit! ACCESS TO MANUAL TRADING for 70usdt/month 👉 We ain't just showing our results, we can show you the results of our VIP subscribers as well! Check them out: @propheta_reviews Register and get bonuses up to $6,000 Binance | OKX | ByBit👈🏻click! #cryptocurrency#AItrader#signalchannel

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