[Interest] QListWidgetItem selection border too large

Frank Rueter | OHUfx frank at ohufx.com
Tue Apr 4 22:59:35 CEST 2017


Hi,

I have two QListWidgets living in a QSplitter.
I need the items to be editable.
Some of the item labels are longer than the visible label.
When I edit one, it's selection border extends right across the splitter 
like this:


It seems that the selection box is as large as the longest item label in 
the list.
How can I control this so it stays within it's own splitter space?

When I open it in a host app that bundles it's own PySide (and has it's 
one style sheet for all widgets), this problem does not occur, so I'm 
hoping there is a simple solution here.

Attached is the sample code.

Cheers,
frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170405/16036ffa/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 43458 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170405/16036ffa/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FileAnalyserUI.py
Type: text/x-python-script
Size: 3597 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170405/16036ffa/attachment.bin>


More information about the Interest mailing list