[Interest] Child widget drawing over parent?

Etienne Sandré-Chardonnal etienne.sandre at m4x.org
Mon Oct 28 13:48:25 CET 2013


Dear all,

I have the following issue. A widget is defined as a QFrame subclass, and
uses the frame style defined by setFrameStyle(QFrame::Box | QFrame::Sunken)
in the constructor.

This widget uses a QHBoxLayout, with one stretch, and one "SpinDial" child
widget that I have defined elsewhere. As you can imagine, this is for
making a custom spin box.

As you can see on the attached picture, the frame is broken by the
SpinDial, as if it was drawing over the parent. To me, it means that either:
 - The child widget is drawing outside its boundaries, which is normally
not possible.
 - The QFrame has set an improper setContentsMargin
 - The frame drawing is bugged, the bottom border is drawn one pixel higher
than it should

Any idea?

I'm using Qt 4.8.1 under Windows 7  ( MinGW64 gcc )

Thanks,

Etienne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131028/6302f1c0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: frame-issue.png
Type: image/png
Size: 5285 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131028/6302f1c0/attachment.png>


More information about the Interest mailing list