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

Резултати

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

Пребарај: #ecosystemdevelopment

当前筛选 #ecosystemdevelopment清除筛选
Crypto M - Crypto News

@CryptoM · Post #65449 · 13.04.2026 г., 09:15

🚀 Zcash Open Development Lab Unveils Strategic Direction Focused on Post-Quantum Security On April 13, Zcash Open Development Lab (ZODL) founder Josh Swihart announced the latest developments for Zcash, emphasizing a strategic direction centered on post-quantum security, scalability, and user experience. According to BlockBeats, Swihart likened the initiative to the Artemis II lunar mission, highlighting the pursuit of seemingly impossible goals through technological breakthroughs. The ZODL team revealed that Zcash is entering the 'Zcash IV' phase, aiming to build infrastructure akin to a 'lunar base' to support the protocol and applications' secure expansion to billions of users, while advancing the vision of privacy transactions without large-scale financial surveillance. On the product and technology front, ZODL continues to iterate, with its 3.3.x version now available on iOS and Android, featuring new hardware wallet connection management, SDK upgrades, and multiple user experience enhancements. Key developments include advancing Keystone wallet functionality and upgrading the address system (ZIP 316, UIVK/UFVK). Meanwhile, the Zcash core team has addressed several system issues and is progressing with the Zallet alpha version development, strengthening unified address standards and wallet interaction experience to lay the foundation for future scalability and performance improvements. Additionally, ZODL disclosed ongoing growth in application data and participation in a stablecoin privacy summit to enhance industry collaboration. However, due to increased regulatory and network restrictions, ZODL has temporarily removed its app from Russian app stores. The team emphasized that privacy is not optional but a fundamental need in the digital age, and they will continue to accelerate delivery pace to promote ZEC adoption and ecosystem development. The core of Zcash Open Development Lab is to develop an open, self-custodial private financial platform, aiming to expand ecosystem interoperability through collaboration and bring protected ZEC transactions to the global mainstream market. #Zcash#ZODL#PostQuantumSecurity#Cryptocurrency#Privacy#Blockchain#Scalability#UserExperience#KeystoneWallet#Zallet#Stablecoin#FinancialPrivacy#EcosystemDevelopment#DigitalPrivacy#OpenDevelopment#ZEC