Originally Posted by darkstarbyte
Oh, with the hide function. (If I am naming the right one.)
Thanks for your response, I was starting to think I was a very lonely coder.
I got what you were looking for. I have two main windows in my program. you may have created a variable of the second window in the first windows header file and initiated it in the first windows constructor. So, set its parent to 0. if you do this, you can close the first window then.
here's a sample:
first window header
explicit MainWindow(QWidget *parent = 0);
first window constructor:
MainWindow::MainWindow(QWidget *parent) :
settings = new SettingsWindow(cfg,0);
second (settings) window constructor:
SettingsWindow::SettingsWindow(ConfigSource &src, QWidget *parent) :
you may not worry about the first parameter of settings window, COnfigSource, I mean, I have added this myself. you simply have one parameter which is QWidget *parent. set it to 0.