Results 1 to 3 of 3

Thread: Special Modal Dialog

  1. #1
    Join Date
    Sep 2007
    Posts
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Special Modal Dialog

    Hi,

    I am stuck with the following situation:

    I am writing a CAD application, so my main widget is a subclass of QGLWidget. Now, say that my application is performing checkings in the geometry and needs to ask a question to the
    user (Yes or No) in order to perform a specific action.
    By default, i would display a modal dialog or messagebox and wait until the user answers the question, then i would continue the rest of the checkings. However, i want the user to be able to interact with the QGLWidget (rotating, translating, zooming, etc) when the dialog is displayed (so the user can examine the geometry before answering the dialog's question). But a modal dialog would prevent the user from interacting with the QGLWidget. I know, i can display a modeless dialog and catch its finished() signal in order to continue the operations. However, the problem is that it is a bit tricky to keep status of the current state of the operations in order to be able to continue them and in addition i want the user
    to be able to interact only with the QGLWidget and not any other widget, menu, toolbars etc!!!!

    Any suggestions?

    Thanks in advance,
    Panos

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Special Modal Dialog

    In such a case, I would suggest to display the GLWidget inside the Dialog itself

  3. #3
    Join Date
    Sep 2007
    Posts
    10
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Special Modal Dialog

    Unfortunately, this is an option... I was thinking of showing the dialog as a modeless dialog
    and wait for it to be closed with an infinite while. But in order for my application not to freeze, i will have to call qApp->processEvents(). However i don't think this is a good approach...

    Is it possible to start a local eventLoop? Will it help me?
    Last edited by adonel; 13th May 2008 at 09:42.

Similar Threads

  1. QGraphicsView: Dialog Position Doubt
    By arjunasd in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2007, 17:48
  2. Special Dialog
    By avis_phoenix in forum Qt Programming
    Replies: 2
    Last Post: 29th September 2006, 06:05
  3. System modal dialog!!
    By boss_bhat in forum Qt Programming
    Replies: 2
    Last Post: 23rd June 2006, 07:01
  4. QDialog::exec() cereates no modal dialog
    By sboesch in forum Qt Programming
    Replies: 8
    Last Post: 27th March 2006, 17:03
  5. dialog box
    By Bahar in forum Qt Programming
    Replies: 3
    Last Post: 31st January 2006, 14:52

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.