@centralasian_greenuniversity · Post #347 · 13.11.2025 г., 17:12
#GreenUniversity#StudentLife ✉️[email protected] ☎️ +998 55 512 00 77 📍Location 🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube
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
Пребарај: #greenuniversity
@centralasian_greenuniversity · Post #347 · 13.11.2025 г., 17:12
#GreenUniversity#StudentLife ✉️[email protected] ☎️ +998 55 512 00 77 📍Location 🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube
Hashtags
@centralasian_greenuniversity · Post #335 · 12.11.2025 г., 04:07
🌿Cozy Days at Green University #GreenUniversity#StudentLife ✉️[email protected] ☎️ +998 55 512 00 77 📍Location 🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube
Hashtags
@centralasian_greenuniversity · Post #461 · 05.12.2025 г., 05:17
December 5 - World Soil Day 🌳Today we celebrate World Soil Day, a global reminder of how important healthy soil is for food security, ecosystems, and our future. 🍀Let’s appreciate the ground beneath our feet — it sustains life more than we realize. #WorldSoilDay#GreenUniversity ✉️[email protected] ☎️ +998 55 512 00 77 📍Location 🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube
Hashtags
@obrazovanie_uzbekistan · Post #2872 · 11.07.2024 г., 13:00
🎓Приём в Green University ещё открыт!🌿 📚Степени бакалавра: Бакалавр (с отличием) Экологический и устойчивый менеджмент Бакалавр (с отличием) Окружающая среда и экономика Бакалавр (с отличием) Экология и государственное управление 🎓Магистерские степени: Магистр (с отличием) Экологическое право Магистр (с отличием) Экологические коммуникации Магистр (с отличием) Устойчивое развитие Магистр (с отличием) Устойчивые финансы 🔄Возможность перевода: продолжить обучение на 2-м курсе Green University Чтобы подать заявку или узнать критерии приема: 📧Электронная почта: [email protected] 📞Телефон: +998555120077 Подайте заявку прямо сейчас:https://greenuniversity.uz/en/apply/main Критерии поступления:https://greenuniversity.uz/en/apply/manual/admission-criteria Центрально-азиатский университет по изучению окружающей среды и изменения климата Green University Формируйте более зеленое будущее вместе с нами! 🌍 Telegram | Instagram #GreenUniversity#Admissions#Sustainability#TransferStudents
@centralasian_greenuniversity · Post #315 · 09.11.2025 г., 09:04
📣Exciting news! 🗓This Tuesday, November 11, Dr. Anna Ubaydullaeva — lecturer at GREEN University, Tashkent, will give a seminar in Rome, Italy (RomaTre) on “Climate Change Law and Sustainable Development in Central Asia: Lessons and Perspectives from Uzbekistan.” 🔜A great opportunity to share Uzbekistan’s experience and vision on climate sustainability with the international community! 🇺🇿🤝🇮🇹 #GREENUniversity#Uzbekistan#ClimateAction#Sustainability ✉️[email protected] ☎️ +998 55 512 00 77 📍Location 🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube
@centralasian_greenuniversity · Post #661 · 26.01.2026 г., 15:51
#InternationalEnvironmentalEducationDay#GreenUniversity#LetsProtectourPlanet ✉️[email protected] ☎️ +998 55 512 00 77 📍Location 🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube
@centralasian_greenuniversity · Post #1073 · 17.04.2026 г., 10:20
Green University Organized “Youth Day” Events On April 16, in celebration of Youth Day, Green University organized a series of events covering various areas for students and young people. 🖥The program included psychological consultations, English language classes, sports competitions, and the “Zakovat” intellectual game. In addition, a preventive awareness session with representatives of the internal affairs bodies was held, followed by an open Q&A session on legal topics. #GreenUniversity#YouthDay#StudentLeague 👉ReadMore ___________________ Green University’da “Yoshlar kuni” tadbirlari o‘tkazildi 16-aprel “Yoshlar kuni” munosabati bilan Green University’da talabalar va yoshlar uchun turli yo‘nalishlarni qamrab olgan tadbirlar tashkil etildi. 🖥Dastur doirasida psixologik konsultatsiyalar, ingliz tili mashg‘ulotlari, sport musobaqalari hamda “Zakovat” intellektual o‘yini o‘tkazildi. Shuningdek, ichki ishlar organlari vakillari ishtirokida profilaktik uchrashuv va huquqiy mavzudagi ochiq savol-javob sessiyasi tashkil etildi. #GreenUniversity#YoshlarKuni 👉Batafsil ✉️[email protected] ☎️ +998 55 512 00 77 📍Location 🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube
@centralasian_greenuniversity · Post #670 · 28.01.2026 г., 04:54
January 28 — International Reducing CO₂ Emissions Day 📸👩🏫👨🏫Every action counts! Today is a reminder that students are not just learners, but future leaders of a more sustainable world. ✔️From saving energy and choosing public transport to supporting green innovations, small daily choices can make a big difference for our planet. 🔼Let’s work together for cleaner air, a healthier environment, and a greener future. The change starts with us. #GreenUniversity#ClimateAction#CO2Reduction#SustainableFuture ✉️[email protected] ☎️ +998 55 512 00 77 📍Location 🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube
@centralasian_greenuniversity · Post #481 · 05.12.2025 г., 12:26
Law and Ecology Roundtable at Green University 🗓On December 4, 2025, Green University held a high-level Roundtable on Law and Ecology bringing together researchers from leading international institutions to discuss pressing issues at the intersection of environmental governance, ecological transition, and sustainable development. The roundtable featured four expert presentations: 🟠Pauline Couteau (Sciences Po) – introducing the role and research initiatives of Sciences Po in the field of environmental studies; 🟠Dr. Álvaro Artigas Pereira (Sciences Po) – delivering insights on “Confronting Policies to Complexity: Policy Capacity and Development in Shifting Times”; 🟠Tom Wassenaar (CIRAD) – discussing environmental risks and territorial approaches; 🟠Prof. Bénédicte Cenki (University of Montpellier) – presenting on the challenges of mineral resources and the ecological transition, and how to balance energy demands with environmental protection. 🟡The session concluded with an open discussion, allowing students and researchers to engage directly with the speakers. #GreenUniversity#LawAndEcology#ClimateAction#SustainableDevelopment ✉️[email protected] ☎️ +998 55 512 00 77 📍Location 🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube
@centralasian_greenuniversity · Post #36 · 09.07.2024 г., 04:54
🎓Green University Admissions Still Open!🌿 Join our cutting-edge programs: 📚Bachelor's Degrees: BSc (Hons) Environmental and Sustainable Management BSc (Hons) Environment and Economics BSc (Hons) Ecology and Public Administration 🎓Master's Degrees: MSc (Hons) Environmental Law MSc (Hons) Environmental Communication MSc (Hons) Sustainable Development MSc (Hons) Sustainable Finance 🔄 Transfer Opportunity: Continue in 2nd year at Green University! To apply or for admission criteria: 📧 Email: [email protected] 📞 Call: +99855 512 00 77 Apply now:https://greenuniversity.uz/en/apply/main Admission criteria:https://greenuniversity.uz/en/apply/manual/admission-criteria Shape a greener future with us!🌍 #GreenUniversity#Admissions#Sustainability#TransferStudents
@centralasian_greenuniversity · Post #494 · 09.12.2025 г., 04:43
📸 Highlights from the Experience Sharing Network #GreenUniversity#ExperienceSharingNetwork#Sustainability#YouthLeadership ✉️[email protected] ☎️ +998 55 512 00 77 📍Location 🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube
@centralasian_greenuniversity · Post #344 · 13.11.2025 г., 07:44
Healthy Planet, Healthy You! ❗️Informative signs on “General Rules and Environmental Protection: Healthy Eating Habits” have been placed around the campus by psychologist Muslima Nabijonova and tutor Shokhrukh Obidov — reminding everyone that caring for nature starts with caring for ourselves #GreenUniversity#EcoLifestyle#HealthyEating#Sustainability ✉️[email protected] ☎️ +998 55 512 00 77 📍Location 🌐Website | 📱Telegram | 📱Instagram | 📱LinkedIn | 🟥YouTube