@googlefactss · Post #40910 · 08.04.2026 г., 21:19
Catfish have over 27,000 taste buds. Humans have around 7,000. @googlefactss#fish
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
Пребарај: #fish
@googlefactss · Post #40910 · 08.04.2026 г., 21:19
Catfish have over 27,000 taste buds. Humans have around 7,000. @googlefactss#fish
Hashtags
@googlefactss · Post #40314 · 13.12.2025 г., 11:04
Eels undergo a life cycle called catadromous. This is when an animal is born in salt water, migrates to fresh water to grow, and then returns to the ocean to spawn @googlefactss#fish
Hashtags
@googlefactss · Post #39912 · 08.10.2025 г., 18:04
Lampreys and hagfish are the most primitive living vertebrates, representing the sole survivors of the jawless fish lineage that diverged early in vertebrate evolution. @googlefactss#fish
Hashtags
@skilllabs · Post #255 · 01.06.2022 г., 15:36
Hey Skill Labs community, have you already played our fishing game on Discord?🐠🧩 👉 Join our Discord NOW: https://discord.com/invite/skilllabs 👉 Go to the channel called: #fish (in the offtop section) and see the rules in a pinned message 👉 We are currently hosting tournaments!
Hashtags
@tonorbital · Post #243 · 25.06.2024 г., 18:01
🎉 Exciting News from #FISH! 🎉 Minting for @RetardinoTON gamepass NFTs is now live! 💫 In the upcoming patch, players can also purchase amazing cosmetic items associated with RetarDino partners. 📈 As a bonus, 50% of the profit will go towards the buyback and burn of #FISH tokens. 🎮 Don't miss out—owning an NFT is your exclusive gateway to play and earn $WFOSS. Let the adventure begin!
Hashtags
@pixiv · Post #215 · 23.05.2017 г., 14:08
#Fish げみ pixiv.net/i/28680466
Hashtags
@pixiv · Post #201 · 16.05.2017 г., 13:07
#Fish enj! pixiv.net/i/58149654
Hashtags
@skilllabs · Post #195 · 10.05.2022 г., 14:31
Beneficial Fishing - You Got 10 BUSD 🤑 Do you remember that Skill Labs launched a Fishing game on Discord? 🔝 We summarized the first results and decided to give 10 BUSD for TOP-5 on the list 🪝 From now, Skill Labs announcing a small tournament for everyone, you play - you earn 👉 Join our Discord and play: https://discord.gg/skilllabs 👉 Go to the channel named: #fish (the offtop section) The results will be published on May 13th 🚀 🐡🐠🐟
Hashtags
@skilllabs · Post #165 · 29.04.2022 г., 20:35
Play in Discord and get rewards 🕹 Hey Skill Guilders, let's play the fishing game using our Discord bot 🦈 👉 Join our Discord: https://discord.gg/skillguilds 👉 Go to the channel called: #fish (the offtop section) 👉 There you will see a pinned message with rules and a tutorial on how to play 🧩 Play the game and complete daily quests using the command: %quests Very soon we will launch a tournament among our community, be ready and train yourself 💪 Join now: https://discord.gg/skillguilds
Hashtags
@SukoFaultyArtLair · Post #4166 · 23.09.2019 г., 20:14
https://twitter.com/Krekk0v/status/1088215914569318402 #female#fish
@OnlineEducation10 · Post #74 · 24.02.2021 г., 05:54
Rare jellyfish species called Halitrephes maasi - #Animals#Fishhttps://twitter.com/i/status/1359961404028063744
@TgSticker · Post #42384 · 04.02.2026 г., 11:21
Которыбы #cat#fish#memes 😊создать свои стикеры