Note that there are some explanatory texts on larger screens.

plurals
  1. POQDockWidget Content bug with titlebar
    text
    copied!<p>Here is my problem: I created a QDockWidget and put a QGraphicsView in it, while it is floating everything shows up correctly, but if Dock it somewhere, the starting X and Y of my content is on the titlebar of the QDockWidget. Obviously, it should be under:</p> <pre><code>tilesetWindow = new QDockWidget(tr("Tileset"), this); tilesetWindow-&gt;setMinimumSize(256,256); tilesetWindow-&gt;setFloating(true); connect(tilesetWindow, SIGNAL(visibilityChanged(bool)), this, SLOT(triggeredTileset())); tilesetViewer = new QGraphicsView(tilesetWindow); tilesetViewer-&gt;resize(256,256); tilesetViewer-&gt;show(); </code></pre> <p>An image to illustrate this: <a href="http://img86.xooimage.com/files/d/7/6/problem-391a96a.png" rel="nofollow">http://img86.xooimage.com/files/d/7/6/problem-391a96a.png</a></p> <p>I've tried to put the QGraphicsView in a container and then in the QDockWidget but had the same result as above. it's the only place where I write code for the QDockWidget.</p> <p>How can I make it start at the right place when it is Docked?</p> <p>Edit:</p> <p>I tried in a new QtProject and made a QDockWidget with a QTextBrowser in it and had the same bug:</p> <pre><code>MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui-&gt;setupUi(this); QDockWidget *dock = new QDockWidget(this, 0); dock-&gt;setFloating(true); QTextBrowser *t = new QTextBrowser(dock); t-&gt;show(); } </code></pre> <p>I'm missing something I think... </p> <p>Qt Creator 2.4.1 Based on Qt 4.7.4 (32 bit)</p>
 

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