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

Резултати

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

Пребарај: #jupiter

当前筛选 #jupiter清除筛选
Crypto Drop Club

@drop_cryptogo · Post #1658 · 13.02.2025 г., 21:35

🗣#JUPITER Check if you received rewards from Jupiter ✔️Link to check Let us know in the comments if you got something! 💰🚀 ☝️ Start trading on Bybit Crypto Drop Club 👉 SUBSCRIBE

Hashtags

Crypto Drop Club

@drop_cryptogo · Post #1629 · 22.01.2025 г., 18:35

🗣#JUPITER JUP tokens are available for claiming! ✔️ Claim here 🟠Hurry up and claim before the token price falls. All tokens can be claimed directly to your wallet. Crypto Drop Club 👉 SUBSCRIBE

Hashtags

Crypto Drop Club

@drop_cryptogo · Post #1613 · 05.01.2025 г., 16:07

🗣#JUPITER The airdrop from Jupiter is scheduled for the 18th-24th ✔️Post link with details 🟠The checker will be available a few days before the airdrop. Ready to get rich? Crypto Drop Club 👉 SUBSCRIBE

Hashtags

TONlines – News

@tonlines · Post #6847 · 18.04.2025 г., 19:59

⚡️swap.coffee Triumphs in Aggregator Competition #Jupiter#TON swap.coffee has been recognized as the best solution in the Aggregator Competition held by Jupiter and the TON Foundation. The team is dedicated to creating a user-friendly and stable DeFi product on TON, marking a significant achievement in the ecosystem. Source: link @tonlines

Hashtags

✧˚ CLOSE.

@MOONIVRSE · Post #47666 · 11.02.2023 г., 13:17

‌ ‌ ‌‌ ‌ ‌ ‌‌ ‌ ‌‌ 👩🏻‍🚀💄: *𝗕𝗢𝗢𝗠* 🤯🤯 Woah 😵‍💫😵... What was that 🤔🤔? Its was a super-duper big *boom* 💥💥 that just come to our 𝗯𝗲𝗮𝘂𝘁𝗶𝗳𝘂𝗹 𝗺𝗼𝗼𝗻 🌑🌕, and look. They giving us a super-duper adorable 𝗽𝗮𝗰𝗸𝗮𝗴𝗲 📦📦, lets check it now! Ooh 😯😯, its a #Jupiter called " Giselle & Jihoon Couple Scribble " from our 𝗳𝗿𝗶𝗲𝗻𝗱𝘀 👨‍👩‍👧‍👦, which is #Awäa. Ah, thank you @moonivrse lets check the licence first! Oh, its only for PU (Personal Use)

✧˚ CLOSE.

@MOONIVRSE · Post #47663 · 11.02.2023 г., 13:01

‌ ‌ ‌‌ ‌ ‌ ‌‌ ‌ ‌‌ 👩🏻‍🚀💄: *𝗕𝗢𝗢𝗠* 🤯🤯 Woah 😵‍💫😵... What was that 🤔🤔? Its was a super-duper big *boom* 💥💥 that just come to our 𝗯𝗲𝗮𝘂𝘁𝗶𝗳𝘂𝗹 𝗺𝗼𝗼𝗻 🌑🌕, and look. They giving us a super-duper adorable 𝗽𝗮𝗰𝗸𝗮𝗴𝗲 📦📦, lets check it now! Ooh 😯😯, its a #Jupiter called " Olivia Hye & Taehyung Couple Scribble " from our 𝗳𝗿𝗶𝗲𝗻𝗱𝘀 👨‍👩‍👧‍👦, which is #Awäa. Ah, thank you @moonivrse lets check the licence first! Oh, its only for PU (Personal Use)

✧˚ CLOSE.

@MOONIVRSE · Post #47659 · 11.02.2023 г., 13:00

‌ ‌ ‌‌ ‌ ‌ ‌‌ ‌ ‌‌ 👩🏻‍🚀💄: *𝗕𝗢𝗢𝗠* 🤯🤯 Woah 😵‍💫😵... What was that 🤔🤔? Its was a super-duper big *boom* 💥💥 that just come to our 𝗯𝗲𝗮𝘂𝘁𝗶𝗳𝘂𝗹 𝗺𝗼𝗼𝗻 🌑🌕, and look. They giving us a super-duper adorable 𝗽𝗮𝗰𝗸𝗮𝗴𝗲 📦📦, lets check it now! Ooh 😯😯, its a #Jupiter called " Hanni & Chenle Couple Scribble " from our 𝗳𝗿𝗶𝗲𝗻𝗱𝘀 👨‍👩‍👧‍👦, which is #Awäa. Ah, thank you @moonivrse lets check the licence first! Oh, its only for PU (Personal Use)

✧˚ CLOSE.

@MOONIVRSE · Post #47656 · 11.02.2023 г., 12:53

‌ ‌ ‌‌ ‌ ‌ ‌‌ ‌ ‌‌ 👩🏻‍🚀💄: *𝗕𝗢𝗢𝗠* 🤯🤯 Woah 😵‍💫😵... What was that 🤔🤔? Its was a super-duper big *boom* 💥💥 that just come to our 𝗯𝗲𝗮𝘂𝘁𝗶𝗳𝘂𝗹 𝗺𝗼𝗼𝗻 🌑🌕, and look. They giving us a super-duper adorable 𝗽𝗮𝗰𝗸𝗮𝗴𝗲 📦📦, lets check it now! Ooh 😯😯, its a #Jupiter called " Eunchae & Ni-ki Couple Scribble " from our 𝗳𝗿𝗶𝗲𝗻𝗱𝘀 👨‍👩‍👧‍👦, which is #Awäa. Ah, thank you @moonivrse lets check the licence first! Oh, its only for PU (Personal Use)

✧˚ CLOSE.

@MOONIVRSE · Post #47653 · 11.02.2023 г., 12:53

‌ ‌ ‌‌ ‌ ‌ ‌‌ ‌ ‌‌ 👩🏻‍🚀💄: *𝗕𝗢𝗢𝗠* 🤯🤯 Woah 😵‍💫😵... What was that 🤔🤔? Its was a super-duper big *boom* 💥💥 that just come to our 𝗯𝗲𝗮𝘂𝘁𝗶𝗳𝘂𝗹 𝗺𝗼𝗼𝗻 🌑🌕, and look. They giving us a super-duper adorable 𝗽𝗮𝗰𝗸𝗮𝗴𝗲 📦📦, lets check it now! Ooh 😯😯, its a #Jupiter called " Karina & Jaehyun Couple Scribble " from our 𝗳𝗿𝗶𝗲𝗻𝗱𝘀 👨‍👩‍👧‍👦, which is #Awäa. Ah, thank you @moonivrse lets check the licence first! Oh, its only for PU (Personal Use)

✧˚ CLOSE.

@MOONIVRSE · Post #47650 · 11.02.2023 г., 12:47

‌ ‌ ‌‌ ‌ ‌ ‌‌ ‌ ‌‌ 👩🏻‍🚀💄: *𝗕𝗢𝗢𝗠* 🤯🤯 Woah 😵‍💫😵... What was that 🤔🤔? Its was a super-duper big *boom* 💥💥 that just come to our 𝗯𝗲𝗮𝘂𝘁𝗶𝗳𝘂𝗹 𝗺𝗼𝗼𝗻 🌑🌕, and look. They giving us a super-duper adorable 𝗽𝗮𝗰𝗸𝗮𝗴𝗲 📦📦, lets check it now! Ooh 😯😯, its a #Jupiter called " Haerin & Mingi Couple Scribble " from our 𝗳𝗿𝗶𝗲𝗻𝗱𝘀 👨‍👩‍👧‍👦, which is #Awäa. Ah, thank you @moonivrse lets check the licence first! Oh, its only for PU (Personal Use)

✧˚ CLOSE.

@MOONIVRSE · Post #47647 · 11.02.2023 г., 12:46

‌ ‌ ‌‌ ‌ ‌ ‌‌ ‌ ‌‌ 👩🏻‍🚀💄: *𝗕𝗢𝗢𝗠* 🤯🤯 Woah 😵‍💫😵... What was that 🤔🤔? Its was a super-duper big *boom* 💥💥 that just come to our 𝗯𝗲𝗮𝘂𝘁𝗶𝗳𝘂𝗹 𝗺𝗼𝗼𝗻 🌑🌕, and look. They giving us a super-duper adorable 𝗽𝗮𝗰𝗸𝗮𝗴𝗲 📦📦, lets check it now! Ooh 😯😯, its a #Jupiter called " Kazuha & Haechan Couple Scribble " from our 𝗳𝗿𝗶𝗲𝗻𝗱𝘀 👨‍👩‍👧‍👦, which is #Awäa. Ah, thank you @moonivrse lets check the licence first! Oh, its only for PU (Personal Use)

✧˚ CLOSE.

@MOONIVRSE · Post #47644 · 11.02.2023 г., 12:45

‌ ‌ ‌‌ ‌ ‌ ‌‌ ‌ ‌‌ 👩🏻‍🚀💄: *𝗕𝗢𝗢𝗠* 🤯🤯 Woah 😵‍💫😵... What was that 🤔🤔? Its was a super-duper big *boom* 💥💥 that just come to our 𝗯𝗲𝗮𝘂𝘁𝗶𝗳𝘂𝗹 𝗺𝗼𝗼𝗻 🌑🌕, and look. They giving us a super-duper adorable 𝗽𝗮𝗰𝗸𝗮𝗴𝗲 📦📦, lets check it now! Ooh 😯😯, its a #Jupiter called " Karina & Jaemin Couple Scribble " from our 𝗳𝗿𝗶𝗲𝗻𝗱𝘀 👨‍👩‍👧‍👦, which is #Awäa. Ah, thank you @moonivrse lets check the licence first! Oh, its only for PU (Personal Use)

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