Bug 390272 - Wrong rendering of QComboBox in itemviews
Summary: Wrong rendering of QComboBox in itemviews
Status: RESOLVED WORKSFORME
Alias: None
Product: Oxygen
Classification: Plasma
Component: style (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Hugo Pereira Da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-11 15:23 UTC by Christian Ehrlicher
Modified: 2022-12-15 05:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Testcase (612 bytes, text/plain)
2018-02-11 15:23 UTC, Christian Ehrlicher
Details
Unreadable combobox (4.20 KB, image/png)
2018-02-11 15:24 UTC, Christian Ehrlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ehrlicher 2018-02-11 15:23:39 UTC
Created attachment 110537 [details]
Testcase

When a QComboBox is drawn in an itemview, the background is not cleared which results in unreadable text when the background text does not match the text in the combobox (see attachment).
This happens with oxygen and with fusion style. The reason is, that the background is not cleared in Style::drawComboBoxComplexControl(). I'm not sure if it is a KDE or Qt bug but since all Qt styles work fine (maybe by accident because most of them draw the complete combobox rect every time) I decided to create a bug here.
Also setting "widget->setAttribute(Qt::WA_OpaquePaintEvent, false);" in polish() doesn't help (although Qt's fusion style is doing this)...
Comment 1 Christian Ehrlicher 2018-02-11 15:24:45 UTC
Created attachment 110538 [details]
Unreadable combobox
Comment 2 Hugo Pereira Da Costa 2018-02-11 15:45:06 UTC
Hello,
Thanks for reporting.
Fusion is a Qt style (not a kde style). So that would make it a Qt bug. 

Also, looking at oxygen code, it seems there is some background drawn in drawComplexControl, provided SC_ComboBoxFrame is passed to the subcontrols. 
So I would suspect Qt not passing the right subcontrols to the method. 

Still I'll try investigate further. 
Does it also happen with breeze widget style ?
Comment 3 Christian Ehrlicher 2018-02-11 16:56:09 UTC
Sorry, mixed up fusion and breeze :)
It works fine with fusion (qt) style since they're creating a QPixmap as cache and using this for drawing.
It does not work with oxygen (for unknown reason - did not look at the sources).
It does not work with breeze but it is fixed as soon as I fill the background in drawComboBoxComplexControl as it is done in the 'if (editable) .. { if (flat) ..' case.
Comment 4 Justin Zobel 2022-11-15 22:58:56 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 5 Bug Janitor Service 2022-11-30 05:15:24 UTC
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!
Comment 6 Bug Janitor Service 2022-12-15 05:15:42 UTC
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!