Results 1 to 2 of 2

Thread: QGraphicsView, unmanaged artifact with scrollbars

  1. #1
    Join Date
    Jun 2008
    Location
    Boulder, Colorado, USA
    Posts
    70
    Thanks
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Question QGraphicsView, unmanaged artifact with scrollbars

    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:

    Qt Code:
    1. _workspaceStack = new QStackedWidget;
    2. setCentralWidget (_workspaceStack);
    3. ... ... ...
    4.  
    5. _simGraphicsScene = new SimWsGraphicsScene (this);
    6. _simGraphicsView = new SimWsGraphicsView (_simGraphicsScene, this);
    7. _workspaceStack->addWidget (_simGraphicsView);
    8. ... ... ...
    9.  
    10. SimWsGraphicsScene::SimWsGraphicsScene (QObject* parent)
    11. : QGraphicsScene (parent)
    12. {
    13. setSceneRect (-40, -40, 1200, 1200);
    14. QGraphicsTextItem* testItem = addText ("SimWsGraphicsScene Test");
    15. }
    16.  
    17. SimWsGraphicsView::SimWsGraphicsView (SimWsGraphicsScene* scene,
    18. QWidget* parent)
    19. : QGraphicsView (scene, parent)
    20. {
    21. }
    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/
    Attached Images Attached Images

  2. #2
    Join Date
    Jun 2008
    Location
    Boulder, Colorado, USA
    Posts
    70
    Thanks
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Lightbulb Re: QGraphicsView, unmanaged artifact with scrollbars

    Solved. Sorry about this. The artifact was a Q3CanvasView which was tentatively replaced by the new QGraphicsView. Hiding that unmanaged Q3CanvasView did the trick.

Similar Threads

  1. QGraphicsView and scrollbars
    By godmodder in forum Qt Programming
    Replies: 1
    Last Post: 29th March 2008, 22:34
  2. QEvent for QGraphicsView scrollbars?
    By forrestfsu in forum Qt Programming
    Replies: 9
    Last Post: 2nd December 2006, 07:42

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.