@musicliveinternational · Post #5093 · 25.12.2025 г., 13:36
#soldout Такие картины нас очень радуют 🔝💖
Hashtags
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
Пребарај: #soldout
@musicliveinternational · Post #5093 · 25.12.2025 г., 13:36
#soldout Такие картины нас очень радуют 🔝💖
Hashtags
@savinobalzano · Post #790 · 24.10.2024 г., 11:48
https://x.com/SavinoBalzano/status/1849415972316172459?t=5OkmYNi0ZvSeUHgAPD6GTQ&s=19 Carissimi, gira voce che la tredicesima edizione di "Euro, Mercati e Democrazia" di a/simmetrie sia #SoldOut. Visto? La vita è fatta così: ogni lasciata è persa e il tempo è poco. Se però volete sprecarne ancora credendo che la #sinistrucola tenga a cuore ai poveri, che la salvezza sia "ridurre il debito e tenere conti in ordine" o che "menomale! il diritto #UE prevale su quello italiano", fate pure. Gli altri saranno al #googy13.
Hashtags
@singsingchannel · Post #858 · 28.09.2024 г., 20:31
🚀 SOLD OUT! 🚀 Our Sep 28 Sale was a total success, with all Lucky Boxes and Kara Boxes flying off the shelves! 🎉 Missed out? Don't worry—more exciting sales are coming soon. Stay tuned and be ready to grab yours next time! 💥 #SingSingTycoon#NFTSale#SoldOut 🎤Announcement | Chat | X (Twitter) | Website | Game
Hashtags
@singsingchannel · Post #815 · 21.09.2024 г., 05:34
🎉 Kara Box Session 2 SOLD OUT! 🎉 🚀 Another incredible milestone for the SingSing community! 🙌 Thank you to everyone who participated and secured their Kara Box! 💎✨ Stay tuned for more exciting updates and opportunities coming your way! 🎤🔥 #SingSingTycoon#KaraBox#SoldOut#PlayToEarn#SingSing Announcement | Chat | X (Twitter) | Website | Game
@singsingchannel · Post #851 · 28.09.2024 г., 05:40
🎉 SOLD OUT! 🎉 Our Sep 27 SingSing Flash Sale sold out in record time! 🚀 All Lucky Boxes and Kara Boxes are gone 🛍💥 Next Sale will be at 13:00 UTC - Sep 28💎✨ #SingSing#Kara#LuckyBox#Sale#SoldOut 🎤Announcement | Chat | X (Twitter) | Website | Game
@singsingchannel · Post #842 · 26.09.2024 г., 17:04
🎉 SOLD OUT! 🎉 Our Sep 26 SingSing Flash Sale sold out in record time! 🚀 All Lucky Boxes and Kara Boxes are gone 🛍💥 Big thanks to everyone who joined—stay tuned for more exciting sales coming soon! 💎✨ #SingSing#Kara#LuckyBox#Sale#SoldOut 🎤Announcement | Chat | X (Twitter) | Website | Game
@singsingchannel · Post #709 · 17.07.2024 г., 02:15
Treasure NFT Session 6 is officially SOLD OUT! 🎉 Thank you for your amazing support. We're thrilled to announce that the whitelist for Session 7 is now OPEN! To be eligible: 1️⃣Comment on this Post, tag 3 friends. 2️⃣Fill out the form with your wallet address and the comment link👉form (this form will be closed at 14:00 UTC - July 22) Don’t miss your chance to be part of the next adventure. 🚀 Note: The additional Whitelist Pool will be opened in next few hours! #TreasureNFT#SoldOut#Session6#Whitelist#NFTCommunity
@singsingchannel · Post #694 · 11.07.2024 г., 10:54
Treasure NFT Session 5 is officially SOLD OUT! 🎉 Thank you for your amazing support. We're thrilled to announce that the whitelist for Session 6 is now OPEN! To be eligible: 1️⃣Comment on this Post, tag 3 friends. 2️⃣Fill out the form with your wallet address and the comment link👉https://forms.gle/qutLw7av9qbzCNVm8 (this form will be closed at 14:00 UTC - July 15) Don’t miss your chance to be part of the next adventure. 🚀 #TreasureNFT#SoldOut#Session5#Whitelist#NFTCommunity
@singsingchannel · Post #786 · 08.09.2024 г., 13:07
🎉 LUCKY BOX SESSION 1 sold out in a flash! ⚡️ 100 Lucky Boxes were sold out in 1 minute. Big thanks to everyone who grabbed theirs! 🙌 Missed out? Don’t worry—Session 2 is coming soon! Stay tuned! 👀 #NFT#Karaoke#SingSingGame#RUBY#SoldOut#StayTuned