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

Резултати

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

Пребарај: #stability

当前筛选 #stability清除筛选
科技&趣闻&杂记

@kejiqu · Post #3443 · 18.05.2025 г., 08:20

Stability AI 发布可在移动设备上运行的紧凑型开放文本到音频模型 Stability AI 和 Arm 发布了一款在智能手机上运行的紧凑型文本转音频模型,能够在大约 7 秒内生成长达 11 秒的立体声音频片段。 该模型名为“稳定音频开放小型”(Stable Audio Open Small),基于加州大学伯克利分校等研究人员开发的“对抗相对对比”(Adversarial Relativistic-Contrastive,ARC)技术。在 Nvidia H100 GPU 等高端硬件上,它可以在短短 75 毫秒内生成 44 kHz 立体声音频,速度之快足以实现近乎实时的生成。THE DECODER 🏷#Stability#AI#文本到音频#移动设备 📢频道👥群组📝投稿

C U R V E S / Under Magnitude by Marc Fornes / THEVERYMANY The strength of #undermagnitude is achieved by 'Intensive Curvature,' which is the maximization of double #curvature across the project while constraining maximum radii. The result is a #structure that has much tighter curvature with constant change of direction, and results in more structurally performance. 'Intensive Curvature' leads to the curly, tubular branching characteristics consistent across the studio's body of work. In order to achieve structural #stability , each stripe assumes high degrees of curvature individually and high degrees of double curvature in accumulation -- amounting to extreme structural #rigidity throughout the project. #arch_shovel#archdaily

Crypto M - Crypto News

@CryptoM · Post #64619 · 09.04.2026 г., 11:35

🚀 Iranian Parliament Speaker Warns of Consequences for Ceasefire Violations On April 9, Iranian Parliament Speaker Mohammad Bagher Ghalibaf stated that any breach of the ceasefire agreement will result in clear consequences. According to BlockBeats, Ghalibaf emphasized the importance of adhering to the terms of the agreement to avoid potential repercussions. The statement underscores the significance of maintaining peace and stability in the region. #Iran#Parliament#Ceasefire#Consequences#Peace#Stability#MiddleEast

Crypto M - Crypto News

@CryptoM · Post #64966 · 10.04.2026 г., 12:33

🚀 Canada's March Unemployment Rate Matches Previous Value at 6.7% Canada's unemployment rate for March was reported at 6.7%, according to Jin10. This figure aligns with the previous month's rate and is slightly better than the anticipated 6.80%. The data suggests stability in the Canadian labor market during this period. #Canada#unemploymentrate#March2026#labor market #stability#Jin10

Crypto M - Crypto News

@CryptoM · Post #65148 · 11.04.2026 г., 12:31

🚀 Bitcoin's Stability Amid Institutional Buying and Whale Selling Bitcoin has maintained a price range between $65,000 and $73,000 over the past six weeks. According to NS3.AI, this stability is due to institutional buying counterbalancing selling activities from whales, miners, medium-sized holders, and Bhutan. U.S. spot ETFs have absorbed approximately 50,000 BTC monthly. Meanwhile, miners have sold over 19,000 BTC in the past week, and whale holdings have shifted from an annual accumulation of 200,000 BTC to a reduction of 188,000 BTC. #Bitcoin#Stability#InstitutionalBuying#WhaleSelling#NS3AI#USSpotETFs#BTC#Miners#WhaleHoldings#PriceRange#Crypto

Crypto M - Crypto News

@CryptoM · Post #64930 · 10.04.2026 г., 10:28

🚀 Finland to Restrict Nuclear Weapons Deployment During Peacetime Finland has announced plans to declare its intention not to station nuclear weapons on its territory during peacetime, despite ongoing legislative changes that would permit such a deployment. Bloomberg posted on X, highlighting Finland's strategic decision amid evolving security dynamics in the Nordic region. The move comes as Finland reassesses its defense policies in response to regional security concerns. The country's government is working on legal amendments that would enable the deployment of nuclear weapons if deemed necessary in the future. However, Finland remains committed to maintaining a nuclear-free stance during times of peace, reflecting its cautious approach to national security. This decision aligns with Finland's broader defense strategy, which prioritizes stability and peace in the region. The legislative changes are part of Finland's efforts to enhance its defense capabilities while ensuring transparency and adherence to international norms. Finland's stance on nuclear weapons deployment underscores its commitment to regional security and diplomatic engagement. #Finland#NuclearWeapons#Peacetime#DefensePolicy#RegionalSecurity#NordicRegion#NationalSecurity#Diplomacy#LegislativeChanges#NuclearFree#InternationalNorms#Stability

Venture Village Wall 🦄

@venturevillagewall · Post #3411 · 18.12.2024 г., 12:11

Bay Harbor Re Secures $50M Funding Bay Harbor Re, a reinsurance firm, has announced a funding round of $50 million, set for December 13, 2024. The company focuses on delivering stability and protection tailored to meet the specific needs of its partners. #Reinsurance#Funding#Investment#BayHarborRe#FinancialServices#Insurance#Stability#Protection#Partners#BusinessDevelopment#MarketInsights#RiskManagement#Capital #2024 #Profitability#Growth#InsuranceMarket#CorporateNews#FundingRound

Venture Village Wall 🦄

@venturevillagewall · Post #3903 · 17.01.2025 г., 13:00

Market Trends Impact Developer Salaries Developers face salary stagnation as the job market grows competitive. With more candidates than job openings, mid-senior professionals find job switches yield minimal salary increases. Becoming a tech lead is rare and corporations limit hiring senior candidates. Stability may lie in entrepreneurship or pet projects instead. Consider exploring these options for long-term financial health. #JobMarket#DeveloperSalaries#Entrepreneurship#PetProject#IT#CareerGrowth#TechIndustry#EmploymentTrends#SalaryTrends#BusinessModel#Stability#Competition#JobSwitch#MidCareer#SeniorDevelopers#MarketAnalysis#ITCareers#FinancialPlanning#TechJobs#Startup#TechLeadership