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

Резултати

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

Пребарај: #commissions

当前筛选 #commissions清除筛选
占位符

@placeholderpics · Post #59044 · 13.03.2026 г., 17:03

♈羽メェー|Twitch直播: 感謝觀眾委託畫OC! #Commissions https://twitter.com/Feather_OuO/status/2032445212405227526

Hashtags

Cerezo

@CerezoArt · Post #904 · 02.03.2026 г., 18:29

ICON #COMMISSIONS SALE !!!! 😆😆😆 Heyyyy ONLY 3 SLOTS left! 💖 PLEASE READ RULES FIRST!!! 👀 - Any species. Any gender 👍 - Any character allowed😄 - If you're interested please send a message to @Sartikk🦌 - Payment via PayPal only, I use Invoices! ❤️ - I'll be taking 3 (0/3) Slots😄 - The cost will be 30USD☺️ - SALE 4 Icons x 100USD🤩 - I Reserve the right to refuse😦 ~ PRODUCT ~ - The final image will be a fully colored and digital .PNG - Files sended will be a online and full version - The icon will be a bust with the head and part of the chest of the character

Hashtags

Sabertoof's Arts!

@artbysabertoofs · Post #451 · 15.12.2025 г., 20:14

Hi yall! I'm opening for a couple of these headshots for $40! They are finely sketched and flat colored. ^^ Payment through Paypal invoice! DM or reply to inquire about a spot! I'm raising some funds for medicine/gas money so if you want to help without getting a commission, feel free to boost here: https://bsky.app/profile/sabertoofs.bsky.social/post/3m7zf26aslk25 Looking to get these little headshots done roughly 1-2 weeks after accepted. ^^ #commissions

Hashtags

Sabertoof's Arts!

@artbysabertoofs · Post #421 · 07.12.2025 г., 10:57

Hi everyone! I'm offering small headshot/bust doodles like these for $20, and +$15 for color. c: I want to get these done over the weekend, so I'll be working on them and may only take a small handful at this time. ^^ I really need to save money and get some things (and maybe buy myself something for my birthday), so I want to try and do these on stream, too. :D If I get any bites, I'll stream them this morning. ^^ https://picarto.tv/SABERTOOFS <- where I'll be streaming them! If there's any interest - please DM me or respond! :D #commissions

Hashtags

Sabertoof's Arts!

@artbysabertoofs · Post #406 · 20.11.2025 г., 15:09

Good morning everyone!! ❤️ I've opened for one, single-character slot to help cover my move a bit more! I've included some examples here of the quality that I'm offering! Offering the slot for $160. Turnaround time will be long with this, but as always, I will try to get everything tended to as soon as I can. I will also note that I'm moving *this weekend*! I'll be taking this time to settle in to my new home and rehabilitate a little bit before resuming proper work times. If you are willing to be super patient, I'll be happy to work with you. ❤️ DM or reply to claim this. I will invoice on Paypal once details are settled. ^^ Thank you! #commissions

Hashtags

Sabertoof's Arts!

@artbysabertoofs · Post #298 · 23.01.2025 г., 05:56

Hey yall! I'm just posting this here as well! I'm doing icon commissions right now for $40! Turnaround time roughly about a month, all things considered. Here's some examples of the ones I have so far. If you're interested in one, please feel free to DM me here or on BlueSky @Sabertoofs! #commissions Thank you for looking! ^^

Hashtags

Sabertoof's Arts!

@artbysabertoofs · Post #246 · 27.09.2024 г., 19:24

I'm open for one of these types of slots right now for $50! I went to run errands today and just barely had enough for my things, so I'd just like to open for another of these so I feel comfortable for the rest of the month. Please feel free to DM either on here or on X/Bsky @ Sabertoofs to claim. This will be done early October. P.S. I feel bad for opening for a Thing or two but haven't had much options to raise funds otherwise. I apologize. ;n; #commissions

Hashtags

Sabertoof's Arts!

@artbysabertoofs · Post #113 · 01.11.2023 г., 12:07

Hi, everyone! I've got some sketch #commissions open for about a week or so; please check the tweet if interested! https://twitter.com/sabertoofs/status/1719678166103392685 If you can't get one, a retweet helps a bunch. I'll have nothing for groceries/medications by Monday, so anything helps really. 😭

Hashtags

占位符

@placeholderpics · Post #59642 · 22.04.2026 г., 19:10

えむ: skeb納品です。リクエストいただきありがとうございました!!🌕🥛 #Skeb#commissions https://twitter.com/mu_005555/status/2046887037354324263

🎧Are looking for a ❗️Music Track❗️ that represents your Character, Fursona or YouTube, twich?🎹 ❕for a price of 50 dollars depending on the genre and time ✅ •🔥this is the place!🔥I can make a musical track with the personality of your fursona, even for 🔴YouTube🔴 or 🟣twich🟣 •The genre you want, without limits 🎸 🟢Only Paypal🟢 Dm ➡️@rocketwolfy #commissions#furryart#nsfw#sfw

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