[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Breeze] [Bug 368048] Very strange QLineEdit inside QMenu glitch under extreemly specific conditions
From: Hugo Pereira Da Costa via KDE Bugzilla <bugzilla_noreply () kde ! org>
Date: 2016-09-08 11:13:02
Message-ID: bug-368048-17878-4lYOZB82ns () http ! bugs ! kde ! org/
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=368048
--- Comment #5 from Hugo Pereira Da Costa <hugo.pereira.da.costa@gmail.com> ---
Hello again,
I can reproduce.
so indeed this is some sort of conflict between setting a stylesheet, and
setting the WA_TranslucentBackground flag.
So really, something fishy with Qt.
Now, I do not want to remove the flag as set from the style (that would make
all the menus boring square, in breeze and oxygen). However, I found to
possible fixes, on the application side (the qt-bug).
Fix 1: call mMenu->ensurePolished() before setting the stylesheet. For some
reason, setting the TranslucentBackground flag before setting the stylesheet
fixes it (likely because the stylesheet disables again the flag).
Fix 2: rather than using a stylesheed for just changing the background color,
use native Qt API and change the QPalette:
auto palette = mMenu->palette();
palette.setColor( QPalette::Background, qRgb( 240, 0, 0 ) );
mMenu->setPalette( palette );
Here, both changes fix the issue. Any chance you can push that upstream ?
Best regards,
Hugo
--
You are receiving this mail because:
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic