Results 1 to 10 of 10

Thread: QGraphicsView in a QDialog?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: QGraphicsView in a QDialog?

    This is so very very wrong :-)

    Qt Code:
    1. ui->view->setScene(&scene);
    2. ui->view->show();
    To copy to clipboard, switch view to plain text mode 

    Among other lines, this will at least put your paint event in an infinite loop.

    And from what it looks like, you don't even need to use the paint event of your dialog.
    Why use a graphics view and start painting yourself?

    The only thing and nothing else you should be doing in the paint event is painting.

  2. The following user says thank you to tbscope for this useful post:

    jnadelman (3rd June 2010)

Similar Threads

  1. QDialog
    By jayreddy in forum Qt Programming
    Replies: 5
    Last Post: 29th December 2009, 09:51
  2. closing a Qdialog called from a Qdialog
    By OverTheOCean in forum Qt Programming
    Replies: 3
    Last Post: 28th September 2009, 08:02
  3. QDialog
    By Carlsberg in forum Qt Programming
    Replies: 1
    Last Post: 16th June 2009, 09:08
  4. How to "lock" a new qdialog in another qdialog
    By donglebob in forum Qt Programming
    Replies: 7
    Last Post: 4th February 2009, 08:37
  5. QDialog
    By sonuani in forum Newbie
    Replies: 1
    Last Post: 5th March 2008, 06:40

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
  •  
Qt is a trademark of The Qt Company.