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

Резултати

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

Пребарај: #indian

当前筛选 #indian清除筛选

Voiceover Translator Needed (English ➡️ Indian Language) #remote#english#indian#tango NKS Media Agency is looking for talented translators to work on our short video content. Languages We Need: Indian What You'll Do: Translate English scripts into your target language and prepare them for AI voiceover. The goal is clear, natural-sounding audio. Check out an example: https://youtube.com/shorts/MkRlgmLdNnM. Note: Since we use AI for voiceovers, your script adaptation for spoken clarity is key! What We're Looking For: • Strong English or Russian and target language skills (B2+). • Impeccable grammar. • Reliability and ability to meet deadlines. • A reliable computer and internet connection. What We Offer: • Fully remote position with a flexible schedule. • $3 per video. • Focus on creating clear, audible translations. Ready to Apply? Send your CV and translation samples to [email protected] or DM us on Telegram: t.me/nks_HR. Please use the subject: "Translator [English - Target Language]". ⏺Apply: t.me/nks_HR ➖➖➖➖➖➖➖➖➖➖➖ 🪩 Откликнуться быстрее других ➖➖➖➖➖➖➖➖➖➖➖

Airdrop Strikers™

@airdropstrikers · Post #1552 · 02.02.2024 г., 04:30

#DYOR#Advertisement#Indian#Sponsored 💸🎁😳 V I P 2️⃣➕ L U C K Y D R A W 😳🎁💸 rummytryag.com?from_gameid=8197351&channelCode=8184357 ✊Instantly access the⌨️⌨️⌨️⌨️⌨️⌨️⌨️⌨️⌨️⌨️⌨️ rewards!🤑 Don't delay, log in now to take part in the Weekly Bonus and claim your substantial rewards!🍀 Deposit 😀₹1️⃣0️⃣0️⃣0️⃣ and seize the exclusive chance to be among the top 2️⃣0️⃣ spots, with each rewarded 😀₹1️⃣0️⃣0️⃣0️⃣. Every Monday 1️⃣4️⃣🔣0️⃣0️⃣0️⃣⏰ 🔴JOIN NOW AND EARN MORE🔴 rummytryag.com?from_gameid=8197351&channelCode=8184357 🎉Enhance your gaming journey with fantastic benefits! Seize the opportunity to enrich your gaming experience.💩

Reuters: World

@reutersworldchannel · Post #149304 · 13.10.2021 г., 14:23

World Court sides mostly with Somalia in border dispute with Kenya The top U.N. top court ruled on Tuesday largely in favor of Somalia in its dispute with Kenya, setting a sea boundary in part of the Indian Ocean believed to be rich in oil and gas. #Somalia#Kenya#UN#ICJ#Indian Ocean #News#Reuters Subscribe: http://smarturl.it/reuterssubscribe Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled. Get the latest news on: http://reuters.com/ Follow Reuters on Facebook: https://www.facebook.com/Reuters Follow Reuters on Twitter: https://twitter.com/Reuters Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en ➖@reutersworldchannel➖

Trump's Ear

@trumpsear_tg · Post #2158 · 17.02.2026 г., 13:00

In the Indian state of Kerala, the sculptor carved the statue of Trump and Melania as the embodiment of the Indian gods Shiva and Kali. Thus Trump has entered the Pantheon of Hindu gods. #indian#state#kerala#trump#pantheon 👂More on Trump's Ear ⚠️

Desi Memes Funny Jokes

@DESI_MEMES_Funny_Jokes · Post #5423 · 11.10.2024 г., 12:28

🌟EAR BUDS @ ₹39🌟 🔥LOOT DEAL OF THE DAY🔥 🛍Grab fast before it gets Out of stock. Get similar deals in future by joiningLoot Indian Deals🛍 🔰Note- Check all deals instantly 🔰 #Loots#Indian#Deals#offers

Love Nature

@LovelyNature · Post #1587 · 30.05.2021 г., 12:36

"#Tharparkar Cows" - a #Desi#cow breed found mostly in North Western India. "Thar+par+kar" name derives from the fact that they can cross the Thar desert without any difficulty. Hindu #Indian#tharparkar#gomata😍 Join @LovelyNature

Airdrop Strikers™

@airdropstrikers · Post #1592 · 14.02.2024 г., 14:22

🚨Game : TC Games 🤑Refer: High Level Commission 🛃Minimum Deposit : 300Rs 📅Minimum Withdraw : 110Rs 🖥Earn daily : 500-10keasily 🤖Game Link: Join Here 📝Guide: 🔘 Register Using Mobile Number 🔘 Play game and Withdraw and earn High money 🧿Info 🔘 Contact Telegram Support 🔘 Join Telegram Prediction Group1 and Group2 🔘 Only 4-7 Level Sure winning 🔘 Want to become an agent and bonus Contact 🔴Note: Please do your own research (DYOR) before joining to any project.Don't send any fee or penny without doing own research. #TCgames#TcLottery#Indian#inr#TC#Sponsored#Ad

ПретходнаСтраница 1 од 3Следна