[PyQt] QDockWidget offset?

Tony Arnold tony.arnold at manchester.ac.uk
Wed Apr 11 17:20:54 BST 2018


Matic,


On Wed, 2018-04-11 at 14:20 +0000, Matic Kukovec wrote:
> Hi guys,
> 
> I have a QDockWidget onto which I add a QGroupbox. On Windows, there
> are no problems.
> But on Linux there is border with a gap on top from the windows
> frame, with the size similar to a system's menubar.
> To illustrate this I added a screenshot in the attachment that shows
> a QDockWidget that has a QGroupBox added with the 'setWidget'
> function and a QPushButton added to the QGroupBox.
> On the left is the Windows example and on the right is the Linux
> example with the border drawn behind the QPushButton.
> 
> How do I get rid of this border on Linux?

Is your QGroupBox contained within the dockWidgetsContents widget, that
is usually in a QDockWidget and is effectively a layout, or has it
replaced it? I think you need to keep the dockWidgetsContent and add
any other widgets to that and not to the QDockWidget directly.

Your widget structure or the code that creates the QDockWidget instance
would be helpful here.

Regards,
Tony.
-- 
Tony Arnold MBCS, CITP | Senior IT Security Analyst | Directorate of IT Services | G64, Kilburn Building | The University of Manchester | Manchester M13 9PL | T: +44 161 275 6093 | M: +44 773 330 0039


More information about the PyQt mailing list