Results 1 to 3 of 3

Thread: Problem with QDialog

  1. #1
    Join Date
    Aug 2008
    Posts
    84
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Problem with QDialog

    HI every body ,
    I am working on QT4.4.0 integrated with MSVS2005. I created application where I opened MainWindow which is derived fromQMainwindow and in main window on button click event I opened an dialog . For that dialog I enabled Qt::WStyle_MinMax property . Now I run my application , on main window I opened the dialog, If I minimize the dialog the mainwindow also minimizing . I am not able to get the problem.

    I openend dialog as
    Qt Code:
    1. diaolg dg(this);
    2. this.exec();
    To copy to clipboard, switch view to plain text mode 


    Now I also want to do updates from dialog class ie think there is a radiabutton in mainwindow now I want to make checked in dialog class . But In my application if I do so it was not updating , it is updating only when I close the dialog . I cant get why it was happening .
    So please help me to solve this problem.

    Regards,
    sudheer.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Problem with QDialog

    The behavior your are describing has to do with the fact that your dialog is a modal dialog.
    Read the QDialog docs, and get an understanding what does modal dialog mean.
    If you then have further questions feel free to post again.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem with QDialog

    Quote Originally Posted by sudheer168 View Post
    HI every body ,
    If I minimize the dialog the mainwindow also minimizing . I am not able to get the problem.
    add a mdiarea. add ur dialog to it. Now if u'll minimize the dialog, mainwindow wont be minimized.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

Similar Threads

  1. closing a Qdialog called from a Qdialog
    By OverTheOCean in forum Qt Programming
    Replies: 3
    Last Post: 28th September 2009, 08:02
  2. Problem in using QHttp with QTimer
    By Ferdous in forum Newbie
    Replies: 2
    Last Post: 6th September 2008, 12:48
  3. adding QAction to QDialog is not working
    By sanjayshelke in forum Qt Programming
    Replies: 3
    Last Post: 13th August 2008, 09:39
  4. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  5. Resizing a QDialog to the content size
    By Nyphel in forum Qt Programming
    Replies: 8
    Last Post: 15th March 2007, 08:16

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.