Summary: | Very strange QLineEdit inside QMenu glitch under extreemly specific conditions | ||
---|---|---|---|
Product: | [Plasma] Breeze | Reporter: | Alex Maystrenko <alexeytech> |
Component: | QStyle | Assignee: | Hugo Pereira Da Costa <hugo.pereira.da.costa> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | hugo.pereira.da.costa, kde, uhhadd |
Priority: | NOR | ||
Version: | 5.7.3 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
URL: | https://github.com/technic/qt5-bug/blob/master/bug.png | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Alex Maystrenko
2016-08-31 10:56:33 UTC
Screenshot with a glitch https://github.com/technic/qt5-bug/blob/master/bug.png In console I see QXcbConnection: XCB error: 8 (BadMatch) I can confirm the issue by running the aforementioned project. Running with Fusion theme works fine but with Breeze the line edit disappears. Hello, thanks for reporting. I'm investigating. I suspect this has to do with setting Qt::WA_TranslucentBackground to QMenu (line 326 of breezestyle.cpp), in order to have round corners. Will keep you posted. (in the meanwhile if someone can try disable that setting and try see if the bug is still present, that would help) Best, Hugo 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 Note that among the two fixes, the second is prefered: it keeps the menu corners round. The first one gets you a square menu (by effectively disabling the style's rounding feature, by calling setStylesheet after polishing) Thank you for the investigation. I remember that I have encountered similar wired behavior with WA_TranslucentBackground in the lxqt-panel. I think it is possible to push a workaround to LXQt project. Should we inform Qt developers about this thing? Is this still relevant/reproducible? Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! |