Displaying QWidget from a function.
hi,
I have an application in which there are two windows(QWidget) The first contains a button and on clicking that button the second window should appear.
I have used QWidjet::show() in the function of the button to display the second windpw.
but my problem is that when i click the button the seconds Window's init() funtion is called but te window is not displayed.
What can be the problem.???????????
Re: Displaying QWidget from a function.
Probably you are creating the second window on the stack and it gets destroyed as soon as the current scope ends.
Create it on the heap(with new) and make sure to delete it when you close it.
Re: Displaying QWidget from a function.
Thanks
my problem is solved by this solution :)
Regards