Results 1 to 4 of 4

Thread: closing a Qdialog called from a Qdialog

  1. #1
    Join Date
    Sep 2009
    Location
    phoenix, AZ
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default closing a Qdialog called from a Qdialog

    Hi,

    l did some research on the forum and didn't find the solution so here we go.

    My main application is a Qdialog ( to display graph using qwt), from there l open other Qdialog ( graph proerties and so on). I open the "child dialog" with .exec(), and l call accept() in the "childtdialog"to close them.

    my issue is when l close the child dialog, it close the main Qdialog.

    I added QApplication::setQuitOnLastWindowClosed(false); in my main function, it doesn't work.

    any idea ?

    thanks,

    Michael

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: closing a Qdialog called from a Qdialog

    Please provide a minimal compilable example reproducing the problem.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2009
    Location
    phoenix, AZ
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: closing a Qdialog called from a Qdialog

    wysota,

    attached is my class using .ui for the Plot2D_Dialog l 'm opening

    from my main dialog l do
    "
    Plot2D_Dialog * plot_2D_properties = new Plot2D_Dialog(config,list_of_graph,this);
    plot_2D_properties->Load_Default();
    plot_2D_properties->exec();
    "
    config and graph being defined in plot2d_dialog.h ( included in the zip).

    then l close my plot2d_dialog by calling Plot2D_Dialog::reject();
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: closing a Qdialog called from a Qdialog

    One can hardly call that a compilable example... I was more interested in your main() function,
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Closing a QDialog
    By eu.x in forum Newbie
    Replies: 2
    Last Post: 12th March 2007, 08:33
  2. Replies: 1
    Last Post: 28th July 2006, 14:10

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.