In a Qt5.5 C++ program I have various QDockWidgets each containing one widget that [mostly] fills its QDockWidget. However, there's a 10px border around the widget which I can't get rid of.
The following attempts didn't seem to achieve anything:
ui->dockable->layout()->setMargin(0);
ui->dockable->layout()->setSpacing(0);
ui->dockable->layout()->setContentsMargins(0,0,0,0);
ui->dockable->setContentsMargins(0,0,0,0);
ui->dockable->setStyleSheet("margin: 0px; padding: 0px");
ui->dockable->setStyleSheet("QDockWidget{ border: 0px }");
this->layout()->setContentsMargins(0,0,0,0);
To replicate the problem:
- File -> new project -> Qt widgets application
- Edit form mainwindow.ui
- Drag dockwidget onto form
- Drag other widget into dockwidget
- Dockwidget background context menu -> Lay out -> vertically
- Should give screenshot like above (in Windows 7)
Upgrading to Qt 5.7.0 doesn't help. Any ideas?



