[PySide] setting colour via stylesheet causes indented combobox items

David Ching dc at dcsoft.com
Sat Sep 17 18:25:49 CEST 2022


I tried with PySide2 and PySide6 on Windows 10.  

PySide2 shows small text not adjusted for high-dpi monitor.  It did not seem
to alter the default display at all.

PySide6 was entirely correct. 

See below

 

On Windows 10, Pyside 5.15.2.1:  

Selection doesn't become red.

No indented tick.

 



 

 

 

On Windows 10, Pyside 6.3.2 (change "import PySide2" to "import PySide6")

Selection correctly is red.

No indented tick (also correct).

 



 

 

Thanks,
David

 

 

 

> Date: Fri, 16 Sep 2022 09:54:40 +1200

> From: Frank Rueter < <mailto:frank at ohufx.com> frank at ohufx.com>

> Subject: [PySide] setting colour via stylesheet causes indented

>            combobox items with tick mark

> Hi all,

> 

> when I set this in a style sheet:

> QWidget:item:selected{background-color: red;

> 

> my combobox items are indented and have a tick mark in front of them.

> How come? And how can I suppress this?

> [image: image.png][image: image.png]

> Here is a code snippet (the colour in the code is now red so ignore that

> bit):

>  <https://gist.github.com/frueter/c36916f8e0901b332a88cbd71ff91c5d>
https://gist.github.com/frueter/c36916f8e0901b332a88cbd71ff91c5d

> 

> Cheers,

> frank

> -------------- next part --------------

> An HTML attachment was scrubbed...

> URL: <
<http://lists.qt-project.org/pipermail/pyside/attachments/20220916/b1aec4ad/
attachment-0001.htm>
http://lists.qt-project.org/pipermail/pyside/attachments/20220916/b1aec4ad/a
ttachment-0001.htm>

> -------------- next part --------------

> A non-text attachment was scrubbed...

> Name: image.png

> Type: image/png

> Size: 6516 bytes

> Desc: not available

> > URL: <
<http://lists.qt-project.org/pipermail/pyside/attachments/20220916/b1aec4ad/
attachment-0002.png>
http://lists.qt-project.org/pipermail/pyside/attachments/20220916/b1aec4ad/a
ttachment-0002.png>

> -------------- next part --------------

> A non-text attachment was scrubbed...

> Name: image.png

> Type: image/png

> Size: 7402 bytes

> Desc: not available

> URL: <
<http://lists.qt-project.org/pipermail/pyside/attachments/20220916/b1aec4ad/
attachment-0003.png>
http://lists.qt-project.org/pipermail/pyside/attachments/20220916/b1aec4ad/a
ttachment-0003.png>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20220917/9eae667b/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 5020 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20220917/9eae667b/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 6644 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20220917/9eae667b/attachment-0003.png>


More information about the PySide mailing list