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

Пребарај: #wassenhove

当前筛选 #wassenhove清除筛选
Trump's Ear

@trumpsear_tg · Post #1427 · 27.08.2025 г., 20:58

A French Woman gets paid for doing nothing for 20 years, now she sues ⚖️ Sometimes real life seems stranger than fiction, and this particular incident seems so! At a time when the need for work-life balance ⚖️, and most employees feeling burnt out 😓 has become a matter of great discussion, news is that a woman has now sued her company for paying her to do nothing! 💸 What might sound like a dream situation for many—getting paid without doing any work 😴—has turned into a nightmare for 59-year-old woman named Laurence Van Wassenhove. She is taking Orange, one of Europe’s largest telecom companies 📞, to court, claiming that the company left her in professional limbo for more than 20 years—by giving her full salary, but no tasks, no responsibilities, and almost no human interaction 😔. Speaking to French broadcaster FTV 📺, Van Wassenhove described her situation as “forced inactivity” that made her feel invisible at work 👻. From being a valued employee to being isolated at work Van Wassenhove joined Orange in 1993, when it was still France Télécom. After developing epilepsy and hemiplegia—partial paralysis on one side of her body 🩺—she moved from her original role to a secretarial position, drawing on her HR background. But in 2002, everything stalled. Hoping to transfer to another region 📍, she was declared unfit for the proposed role by an occupational health review. Instead of finding her an alternative, the company placed her on “standby.” This was the start of a 20-year period of professional exile 😞. “I was paid, yes but treated like I didn’t exist.” Despite receiving her salary 💰, Van Wassenhove told Mediapart she faced financial difficulties, eviction threats 🏠, and severe mental health struggles while raising her autistic child 👶. The lack of purpose and social connection drove her into deep depression, she said 😢. Her lawyer, David Nabet-Martin, argues that Orange’s inaction robbed her of “having a place in society” as a disabled person, inflicting lasting psychological harm 🧠. How her employer responded Orange told La Dépêche it had taken her “personal social situation” into account and offered the “best possible conditions” during her absence from active work. The company says it explored ways to reintegrate her, but frequent sick leave prevented progress 🚫. Van Wassenhove began formally raising the issue in 2015 with the government and the High Authority for the Fight Against Discrimination ✊. She claims little changed, and eventually early retirement was suggested—something she saw as yet another push out of the workforce 👋. Her case highlights the darker side of prolonged inactivity, challenging the assumption that doing nothing for pay is a luxury 🌟. As she takes her fight to court ⚖️, it could ignite new debates about disability rights, workplace inclusion, and the real meaning of “having a job” 💼. #wassenhove#paid#nothing#sue#Orange 👂More on Trump's Ear ⚠️