@Learn_English_from_Zero_to_Hero · Post #60219 · 06.09.2025 г., 18:56
#Slang 💥Dog and bone ⚜(Cockney rhyming slang, Australian rhyming slang) A telephone. ⚡️Oi, keep the noise down! I'm talking to my old lady on the dog and bone.
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
Пребарај: #slang
@Learn_English_from_Zero_to_Hero · Post #60219 · 06.09.2025 г., 18:56
#Slang 💥Dog and bone ⚜(Cockney rhyming slang, Australian rhyming slang) A telephone. ⚡️Oi, keep the noise down! I'm talking to my old lady on the dog and bone.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59993 · 04.08.2025 г., 18:27
#Slang 💥Grand poobah ⚜A person who is important or high-ranking. ☆He once played golf with the grand poobah of their company.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59992 · 04.08.2025 г., 18:27
#Slang 💥Have a cow ⚜To get angry; have a fit. ☆My mom had a cow when I came in late.
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59991 · 04.08.2025 г., 18:27
#Slang 💥A blast from the past ○Something or someone that a person has not seen for a long time that evokes nostalgic feelings. ☆Hearing that record again was a real blast from the past .
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59908 · 23.07.2025 г., 06:16
#Slang 💥Be a hundred years too early •To be so immature and unprepared as to have no hope of achieving an accomplishment. ●Example: ⚡️Don't make me waste my time! You are a hundred years too early to be an opponent worthy of fighting me!
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59733 · 11.05.2025 г., 11:34
#Slang ⚜All good in the hood <Interjection> ▪️ Everything is all right; no problem; used to reassure someone. ▪️"Sorry about nearly breaking your vase, Carl." "I don't mind, man. All good in the hood."
Hashtags
@Learn_English_from_Zero_to_Hero · Post #59225 · 19.02.2025 г., 18:47
#Slang ⚜Go a bundle on 🔆to be extremely fond of ▪️She decided to go a bundle on the new marketing campaign, believing it would significantly boost sales.
Hashtags
@englishuniverseschool · Post #3 · 04.12.2025 г., 14:27
Рубрика ‘слово дня’ И первопроходцем будет слово ‘SLAY’ 😎 /sleɪ/ 1️⃣to impress someone very much or to be very good or impressive 2️⃣to be extremely good or nice Examples: The actors slay me with the quality of their acting. That top slaaaays! Перевод: крутой, впечатляющий (впечатлить) #slang
Hashtags
@englishmeta1 · Post #187 · 01.10.2022 г., 15:21
Bling 🏅 Meaning flashy jewellery worn to create the impression of wealth ❕For example 🔺Check out all the bling around that guy's neck. It must weigh a ton! 🔺Most people have gold bling or silver bling, but they don't usually mix it up. ✍Note "bling-bling" means the same thing 🌟Origin Originally used in U.S. hip-hop and rap culture, and possibly derived from the sound of heavy necklaces hitting one another. ✨Variety This slang term is typically used in American English but may be used in other varieties of English too. ━━━━━━━━━━━━━ #teamjimmy #sirjimmy #slang
Hashtags
@englishmeta1 · Post #182 · 27.09.2022 г., 20:27
Bend someone's ear🧏♀🧏👂 (v),(phr) Definition: 🎧To talk to someone insistently and at length 🧏Example: He was bending my ear about his new car. +++±+++++++++ #slang #sirjimmy #teamjimmy
Hashtags
@englishmeta1 · Post #26 · 08.02.2022 г., 05:00
Slang ✅ Peacocking ✨ Meaning Showing off Peacocking is when a person shows off to impress someone. It comes from the colorful feathers an actual peacock displays to attract a mate. The term is commonly used in regards to dating when a male tries to impress a female by doing something flashy to stand out from among the rest of the suitors. Peacocking may take the form of driving a really expensive car, learning some sweet dance moves, or domming in sports. 🗣 Example 🔸 "James is peacocking on the dance floor in order to get a dance with one of the bridesmaids. 🔸 Gaston peacocking with his chest muscle s ══❖•🌺🌸•❖══ #Slang #Teamjimmy #sirjimmy
Hashtags
@googlefactss · Post #40429 · 28.12.2025 г., 23:01
In Iceland, Að tefla við páfann is a euphemism for pooping; it can be roughly translated as “playing chess with the pope.” @googlefactss#europe#slang#nowyouknow
Hashtags