Creating a minimal QGraphicsScene and QGraphicsView results in a tiny artifact widget obscuring the TOP-LEFT AREA of a QMainWindow (covering part of the menubar). See:
This is with Qt 4.3.3. I've tried all sorts of ways of rearranging the creation of the QGraphicsScene and QGraphicsView to get rid of this thing. No luck. ANY IDEAS?
Some relevant code excerpts:
setCentralWidget (_workspaceStack);
... ... ...
_simGraphicsScene = new SimWsGraphicsScene (this);
_simGraphicsView = new SimWsGraphicsView (_simGraphicsScene, this);
_workspaceStack->addWidget (_simGraphicsView);
... ... ...
SimWsGraphicsScene::SimWsGraphicsScene (QObject* parent
) {
setSceneRect (-40, -40, 1200, 1200);
}
SimWsGraphicsView::SimWsGraphicsView (SimWsGraphicsScene* scene,
{
}
_workspaceStack = new QStackedWidget;
setCentralWidget (_workspaceStack);
... ... ...
_simGraphicsScene = new SimWsGraphicsScene (this);
_simGraphicsView = new SimWsGraphicsView (_simGraphicsScene, this);
_workspaceStack->addWidget (_simGraphicsView);
... ... ...
SimWsGraphicsScene::SimWsGraphicsScene (QObject* parent)
: QGraphicsScene (parent)
{
setSceneRect (-40, -40, 1200, 1200);
QGraphicsTextItem* testItem = addText ("SimWsGraphicsScene Test");
}
SimWsGraphicsView::SimWsGraphicsView (SimWsGraphicsScene* scene,
QWidget* parent)
: QGraphicsView (scene, parent)
{
}
To copy to clipboard, switch view to plain text mode
Thanks in advance,
Phil Weinstein
CADSWES, U of Colorado at Boulder, USA
http://cadswes.colorado.edu/
Bookmarks