Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to update a docking corner?
    primarykey
    data
    text
    <p>I am making a application by Qt, that has a central widget, right dock widget and left dock widget. Their sizes are fixed.</p> <p>They are displayed, but there a blank space between the central widget and the right widget when the left dock widget is floating. <a href="https://twitter.com/#!/hizz_GI/status/155768124321435648/photo/1" rel="nofollow">https://twitter.com/#!/hizz_GI/status/155768124321435648/photo/1</a></p> <p>Will you please tell me the way to remove the blank space?</p> <p>I appreciate you taking the time to respond to my question.</p> <p>code:</p> <pre><code>MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui-&gt;setupUi(this); textEdit = new QTextEdit; textEdit-&gt;setFixedSize(100, 150); setCentralWidget(textEdit); creatDocks(); layout()-&gt;setSizeConstraint(QLayout::SetFixedSize); } void MainWindow::creatDocks() { leftTextEdit = new QTextEdit; rightTextEdit = new QTextEdit; leftDock = new QDockWidget(tr("Left Dock Widget")); rightDock = new QDockWidget(tr("Right Dock Widget")); leftDock-&gt;setFixedSize(100, 150); leftDock-&gt;setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); leftDock-&gt;setWidget(leftTextEdit); rightDock-&gt;setFixedSize(150, 150); rightDock-&gt;setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); rightDock-&gt;setWidget(rightTextEdit); addDockWidget(Qt::LeftDockWidgetArea, leftDock); addDockWidget(Qt::RightDockWidgetArea, rightDock); } </code></pre> <p>I found a solving. It is a way that calls menuWidget()->adjustSize() and adjustSize() when paintEvent of MainWindow without textEdit->setFixedSize() and layout()->setSizeConstraint(). But it is expensive. What time is the proper call? And is this appropriate? </p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload