TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #62 · 4 апр.

Когда разрабатываете свой GUI с помощью PyQt для какого-либо софта бывает необходимо позаимствовать цвета из текущего стиля интерфейса. Например, чтобы правильно раскрасить свои виджеты, подогнав их по цвету. Ведь бывает, что ваш GUI используется в разных софтах. Причём некоторые со светлой темой а другие с тёмной. По умолчанию стили наследуются, но если вы задаёте какую-либо раскраску для части виджета через свой styleSheet, то требуется ссылаться на цвета текущего стиля. Как это сделать? Как получить нужный цвет из палитры имеющегося стиля? Это достаточно просто, нужно использовать класс QPalette и его роли. Например, мне нужно достать цвет текста из одного виджета и применить его в другом как цвет фона (не важно зачем именно так, просто захотелось😊). Получаем палитру виджета и сразу достаём нужный цвет, указав его роль. from PySide2.QtGui import QPalette color = main_window.palette().color(QPalette.Text) теперь можем использовать этот цвет в стилях my_widget.setStyleSheet(f'background-color: {color.name()};') Готово, мы динамически переопределили дефолтный стиль используя текущий стиль окна! На самом деле есть запись покороче, в одну строку и без лишних переменных. Не очень-то по правилам CSS, но Qt это понимает. my_widget.setStyleSheet('background-color: palette(Text);') Этот способ не подходит если вам нужно как-то модифицировать цвет перед применением в своих стилях. В этом случае потребуется первый способ. Зато он прекрасно сработает в файле .qss, то есть не придётся в коде прописывать раскраску отдельных элементов через ссылки на палитру, всё красиво сохранится в отдельном файле .qss! QListView#my_widget::item:selected { background: palette(Midlight); } Про имеющиеся роли можно почитать здесь🌍 #qt#tricks

Hashtags

Резултати

Пронајдени 61 слични објави

Пребарај: #course

当前筛选 #course清除筛选
America 🇺🇸 News & Politics

@America · Post #10012 · 24.10.2025 г., 02:34

😄Course ➖➖➖➖➖➖ A course often has a beginning and an end. If you set or follow a course it’s about where you’re going. 🔜Let’s set a course for home. 🔜We’re on course to get there on time 🔘If you’re studying something – the journey that you’re on is a course. 🔜I’ve just started my English course. 🔜My course ends next year. 🔘If you’re in a car race or a horse race, or playing golf – then you’re going round a course. 🔜This is a really difficult course – there are lots of obstacles. 🔜She got to the end of the course really quickly. 🔘If you’ve having a meal, you might eat different courses between the beginning and the end. 🔜My favourite course is always dessert. 🔘Another way that we use course is in the expression of course – which means either obviously or yes. 🔜Of course, I’ll need your help – can you do it? 🔜Of course! #Course👨‍🏫@America ➖➖➖➖➖➖➖➖➖➖➖➖ 🆕 Crypto News @Money 😁 Crypto Game @Egame 🇺🇸 US News @America 🇯🇵 Japan News @Japan 🇦🇪 UAE News @Dubai ▶️ Popular Movies @Videos 😜 Best Funny Video @Funnys

Hashtags

幽游地

@uudme · Post #3869 · 17.05.2020 г., 12:48

资源:英国原版collins big cat 1至11级 标签:#Course 幼儿教育资源 GD链接:https://drive.google.com/drive/folders/1uyiYG5vuvUBSbjvEt0nSH65Tv3Uvkbx8?usp=sharing @gduudme 若显示内容为空请耐心等待转码完成。资源收集自网络,如需删除请联系频道主

Hashtags

Клуб CDO

@cdo_club · Post #1989 · 24.07.2024 г., 20:52

И как бы прям в продолжении семинара сегодня анонс от команды Flower In partnership with Andrew Ng and his wonderful team at DeepLearning.AI we have launch two courses on federated learning using Flower! The two courses will cover both FL fundamentals, as well as how to federate LLMs and use them to safely include private, sensitive and regulated data. https://www.deeplearning.ai/short-courses/intro-to-federated-learning/?utm_campaign=flower-launch&utm_content=301436194&utm_medium=social&utm_source=twitter&hss_channel=tw-992153930095251456 To support these courses we have made a new slack channel: #course-deeplearning-ai in which we will answer questions, discuss the content and provide additional materials. We will also host an AMA next Monday from this channel that will be also broadcast on our YouTube channel: 29 July 16:00 UTC (09:00 SF, 12:00 NY, 17:00 LON, 18:00 CET, 21:30 IST, 00:00 北京)

Hashtags

Repositorio data science

@repo_science · Post #4210 · 13.09.2024 г., 01:44

#english#course 🤩 CURSO INGLES VAUGHAN 4.0 3 Niveles ✅Basico ✅Intermedio ✅Avanzado 195 Videos Por Nivel +Libros + Audios ----- Main channel: @repo_science Coupons: @freecoupons_reposcience -----

🌀Malayziyaning MRANTI va MATRADE tashkilotlari bilan innovatsiyalar sohasida hamkorlik Joriy yilning 5-iyuli Biznes va tadbirkorlik oliy maktabi delegatsiyasining Malayziyaga tashrifi doirasida Malayziya texnologiya va innovatsiyalar tadqiqot akseleratori (MRANTI) vakillari bilan uchrashuvi bo‘lib o‘tdi. 🇺🇿O‘zb 🤔Cooperation in the field of innovation with Malaysia's MRANTI and MATRADE organizations On July 5, 2024, within the framework of the working visit of the Graduate School of Business’s to Malaysia, a meeting was held with representatives from the Malaysian Research Accelerator for Technology and Innovation (MRANTI). 🇬🇧Eng ✍️Сотрудничество в сфере инноваций с малазийскими организациями MRANTI и MATRADE 5 июля т.г. в рамках пребывания делегации Высшей школы бизнеса и предпринимательства Узбекистана в Малайзии состоялась встреча с представителями Малазийского исследовательского акселератора технологий и инноваций (MRANTI). 🇷🇺Ru #GraduateSchool#Course#Training 🌐Web-site | ✅Telegram | ✅Facebook |🌐Instagram

Voir de ses propres yeux

@voir_yeux · Post #11733 · 14.02.2026 г., 17:08

🇷🇺Environ 6.000 personnes ont participé à une compétition de ski de masse à Khimki, près de Moscou. Les meilleurs ont été désignés dans quatre catégories principales sur une distance de 10 km. Des prix ont également été remis aux vainqueurs de la course costumée d’un kilomètre. #russie#ski#course

123•••56
ПретходнаСтраница 1 од 6Следна