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 слични објави

Пребарај: #userprotection

当前筛选 #userprotection清除筛选
AI & Law

@ai_and_law · Post #43 · 30.06.2023 г., 07:04

Are your favorite Apps invading your privacy? Let's find out! Artificial Intelligence has become a hot topic, raising questions about its impact on user privacy. Are AI apps really intruding on our personal data? A recent investigation by Home Security Heroes (HSH) reveals some eye-opening findings. By examining various AI applications, HSH has uncovered the extent of data intrusion facilitated by AI technology. To determine the invasiveness of AI apps, HSH used the privacy labels available on the App Store. These labels reveal the amount of personal information an app tracks for marketing purposes. They evaluated a total of 159 apps. Key Insights: 1️⃣ 75% of AI apps share users' data with third parties. 2️⃣ 64% of investigated AI-powered apps track users' personal data for their own marketing benefits. The Most Invasive AI Apps: 🔹 Tracking 43% of personal data: Brainly Photoleap: AI Art Photo Editor 🔹 Tracking 36% of personal data: Google Assistant Socratic by Google DaVinci – AI Generated Art Facetune AI Photo/Video Editor How comfortable are you with AI apps tracking and sharing your personal data? Are the benefits worth the potential risks to your privacy? #AI#Privacy#DataSecurity#UserProtection#AIApps

Crypto M - Crypto News

@CryptoM · Post #64897 · 10.04.2026 г., 07:57

🚀 Aethir Blocks Vulnerability Attack, Plans Compensation for Users Aethir has successfully thwarted a vulnerability attack on its bridge contract, estimating user losses to be around $90,000. According to NS3.AI, the company assured that ATH on Ethereum remains secure. Aethir is set to announce a compensation plan for affected users next week. #Aethir#VulnerabilityAttack#CompensationPlan#Ethereum#CryptoSecurity#NS3AI#UserProtection

Crypto M - Crypto News

@CryptoM · Post #65128 · 11.04.2026 г., 07:24

🚀 South Korea Considers Seizing Principal in Virtual Asset Insider Trading Cases South Korea's financial regulators are contemplating the inclusion of a clause to seize the principal in virtual asset insider trading cases in the upcoming second phase of legislation expected later this year. According to PANews, under the current Virtual Asset User Protection Act, the government can only confiscate investment principal in cases of fraudulent transactions or market manipulation. There is no legal basis for seizing the principal in insider trading cases. The Financial Supervisory Service has recently submitted this issue to the Financial Services Commission, which is currently reviewing whether to incorporate it into the second phase of the law. In the stock market, all improper trading crimes can result in the confiscation of the investment principal. #SouthKorea#VirtualAssets#InsiderTrading#FinancialRegulation#Legislation#InvestmentPrincipal#FinancialSupervisoryService#FinancialServicesCommission#MarketManipulation#UserProtection#StockMarket