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

Резултати

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

Пребарај: #username

当前筛选 #username清除筛选
BotsGram®

@botsgram_cu · Post #4399 · 03.10.2021 г., 03:22

¿Que puede hacer este bot? @idtousername_bot Este bot puede convertir cualquier ID numérico (ejemplo: 123456789) en un enlace de perfil. También puede ver su ID numérico en este bot. Idiomas: inglés (Visto en @botsgram_cu) #id#username

Hashtags

New Feature Alert: Username Auction on Split.tg! 🚫 With KYC now mandatory on fragment.com, users without KYC were unable to list their usernames for auction. But not anymore! 👍 Now you can start username auctions directly on split.tg — no KYC required. Just a 1% fee. 👍 👍Ready to get started? Visit split.tg/auction and take full control of your Telegram usernames today! #username#NFT#TON#NoKYC

The $17K Mistake: How a Simple Username Sale Became a Nightmare Probably everyone has already heard about fraudulent schemes with anonymous numbers and usernames through the fake website fragment.com✅ but it seems worth reminding again using the example of a situation in which one of our community lost 15k $USDT and 365 $TON Original Yesterday afternoon a guy with the nickname ⚠️@Yennypp⚠️wroteme , with a question about whether I was selling my username@matildasion. I blurted out a price of 200 TON, he agreed and suggested doing everything right away through - Fragment. I wrote to him that I don't have verification on the fragment, to which he replied that if you are making an offer, you don't need it. In general, nothing suspicious, I sent a link to the offer itself, interestingly, it opened only with the included VPN in the form of a Mini App. Then I unlinked my user and followed the link, the Fragment website opened and the price was 212 TON for my user, a timer was also set for 23:59:NN (after this time the offer expires). I started the sales process (as I thought). It suggested linking a wallet (I chose the main Tonkeeper), then it was necessary to confirm the transaction in the keeper, it was displayed as “failed”, I went in again on the same one, I figured in my head that: - “this is the keeper, it’s probably slow” I signed. The result is on the screen. Then this guy asked to confirm the transaction again and offered to add a ton for the commission... Victim's TON-wallet: matildasion.ton This situation once again shows that you need to be more careful when signing a transaction and remember the main signs of a scam: 1. You are offered conditions that are much higher than the market 2. You are being rushed due to some "circumstances" 3. You are offered to make a transaction in a non-standard way under the pretext of a high commission or "for your own convenience" If you want to support the person who suffered in this story, you can donate any amount that is comfortable for you in any tokens to the wallet: UQCevAC0E72kTNqn5QkpCx8fxVvpdCpfzGo753o3Zf80yP2y P.S. we have known each other in absentia for over two years, he has a confirmed merchant on @wallet #scam#fragment#username