Results 1 to 7 of 7

Thread: dialog still in topLevelWidgets() after been closed

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2010
    Posts
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default dialog still in topLevelWidgets() after been closed

    Hi I`m a very much a newbie to Qt , So learning the basics of QT .
    ( with Qt creator 2 for a mini2440 embedded linux)

    My problem !!! , I`ve made a set of pustbuttons open a set of dialog windows with :-

    void myQtApp::Log_in_clicked()
    {
    Password * My_dialog = new Password;
    My_dialog->setWindowFlags(Qt::FramelessWindowHint );
    My_dialog->move(0,0);
    My_dialog->exec();
    //delete My_dialog;
    }

    The dialog above windows is an “Enter your password blocking screen”
    If I close the box all looks o.k,. it vanishes from the screen and can reopen it again.

    Another dialog window runs this :-

    foreach (QWidget *widget, QApplication::topLevelWidgets())
    {
    test = widget->windowTitle();
    ui->list->append(test);
    } // test is a QString and list a textedit box

    PROBLEM !! , I get the log in screen title appearing all the times I have run it .
    So it`s not been cleared has a toplevelwidget even though the window as been closed.
    The only way I`ve found to stop this is with the delete My_dialog; bit added .

    Thank in advance peter
    Attached Files Attached Files

Similar Threads

  1. Qt 4.2.2 static - *CLOSED*
    By maxpower in forum Qt Programming
    Replies: 1
    Last Post: 19th January 2007, 08:08
  2. modeless dialog closed signal?
    By gfunk in forum Qt Programming
    Replies: 2
    Last Post: 5th January 2007, 00:40
  3. Replies: 3
    Last Post: 23rd July 2006, 18:02
  4. QDomDocument - closed nodes?
    By naresh in forum Qt Programming
    Replies: 2
    Last Post: 19th April 2006, 08:10
  5. delete sub windows when they are closed?
    By Dark_Tower in forum Newbie
    Replies: 3
    Last Post: 21st March 2006, 18:50

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.