[SOLVED] textEdit: how to remove the margins of mainwindow
-
when putting the textEdit widget inside of a dock widget and maximizing the textEdit widget, it does not maximize to the border of the dock widget. Instead, there is about a 20 pixel gap in between the maximized textEdit widget and the dock widget. How, through style sheets probably, can i get the edges of the maximized textEdit widget to be at the border of the docked widget? in the dock method, I have tried to setContentsMargins() to 0 but that have no effect.
-
Does calling
@setWidget(yourTextEdit)@
give you what you need? Then the QTextEdit should fill the dockwidget area. See the documentation on "setWidget":http://doc.qt.nokia.com/latest/qdockwidget.html#setWidget
-
i found that the following code also works great. does anyone know how to set the margins for the textEdit that is maximized in the mainwindow and without any dock widget? I would like to get the textEdit closer to the edge of the screen.
@ui->dockWidgetBottomLeft->setContentsMargins(-10,-10,-10,-10);@
why is the following code not working. its should remove the margins around the textEdit when not inside of a dock widget. the dock widgets is surrounding the mainwindow widget.
@this->layout()->setMargin( 0 );
this->layout()->setContentsMargins(-10,-10,-10,-10);@