peter a
16th September 2010, 23:00
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
( 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