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

Резултати

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

Пребарај: #zahahadid

当前筛选 #zahahadid清除筛选

BEEAH Headquarters / Zaha Hadid Architects BEEAH Group's new headquarters in Sharjah, UAE, was opened on Wednesday, March 30 by His Highness Dr. Sheikh Sultan bin Muhammad Al Qasimi, Ruler of Sharjah. Powered by its solar array and equipped with next-generation technologies for operations at LEED Platinum standards, the new headquarters has been designed by Zaha Hadid Architects (ZHA) to achieve net-zero emissions and will be the group’s management and administrative centre that sets a new benchmark for future workplaces. #arch_shovel#architecture#archdaily#zahahadid

Zaha Hadid Architects wins competition to design the new Hangzhou International Sports Centre. Incorporating a 60,000-seat football stadium and practice pitches, the centre also includes a 19,000-seat indoor arena as well as an aquatics centre with two 50-metre pools. The centre establishes a new riverfront park and public plazas with direct access to Lines 3 and 5 of the city’s expanding metro network. Located within the warm temperate climate of Hangzhou, the International Sports Centre has been designed to the highest 3-Star rating of China’s Green Building Program with each venue providing optimal conditions using natural hybrid ventilation most of the year. Annual solar irradiation analysis has determined the composition of the façade’s external louvres while photovoltaics will harvest solar power for all venues. Ground heat exchange and recovery systems will ensure the most efficient operations of all facilities. #architecture#zahahadid#arch_shovel#archdaily

KAPSARC awarded five LEED EBOM Platinum certifications by the US Green Building Council . The only buildings in Saudi Arabia to receive Platinum LEED Existing Building: Operation & Maintenance (EBOM) certification, KAPSARC’s five community facilities achieved the highest sustainability standards throughout the centre’s design, construction, operations and maintenance procedures. . KAPSARC’s waste management program diverted 94% of solid waste from landfill through waste stream audits that eliminated single-use goods and developed an effective waste segregation strategy across multiple stages. KAPSARC also reduced the compound’s water consumption by 30% with weather-based micro-irrigation, mulching, native planting and efficient faucets. The centre’s energy usage was also reduced by 35% with energy audits regularly identifing energy conservation measures. . #architecture#zahahadid#zahahadidarchitects#architecture#arch_shovel#archidaily

Parametric Architecture. Works by Mariana Cabugueira ( a Senior Architectural Designer at Zaha Hadid Architects): 1 – the Concert Hall. 2 - Tower C - the Zaha Hadid tower. 3-6 – A Mega Luxury Hotel and Office Hybrid Tower. 7-8 – The Floating Park Island. 9-10 – the Mykonos Villa. #arch_shovel#architecture#parametric#maya#zahahadid

Штаб Зюзино

@zuzinoshtab · Post #432 · 01.10.2020 г., 15:00

👆🏿❗️Муниципальный депутат Зюзино Юрий Самгин побеседовал с исполнительным директором архитектурного бюро Zaha Hadid Кристосом Пассосом. Это архбюро разрабатывало концепцию застройки Кузьминок – «столицы реновации», как окрестили район столичные власти. 👉🏿Рекомендуем к просмотру: https://youtu.be/jdqerALE5OM Кстати, вот интервью с господином Пассосом от ноября 2017 г. #конкурс#москомархитектура#кузнецов#самгин#zahahadid#кузьминки