How to show or hide a dialog from another dialog???
How to show or hide a dialog from another dialog???
Which Qt version do you use?
QT 4.1
this is the code i had written in form1.h
#include "form2.h"
void Form1::Show()
{
Form2 frm2;
frm2.show();
}
This shows the form but immediately gets closed
try
Qt Code:
void Form1::Show() { Form2 *frm2 = new Form2(parentOftheForm); frm2->show(); }To copy to clipboard, switch view to plain text mode
Mithin
www.mithin.in
Gayathri (17th November 2006)
Then look for "C++ GUI Programming with Qt4". The Qt3 version of this book is available for download, but I'm not sure if you can download the Qt4 edition too.
QWidget::show() is a non-blocking call and because you create frm2 on the stack it gets destroyed as soon as it goes out of scope.
http://doc.trolltech.com/4.1/qdialog.html#return
Thank you guys.
Basically i am a C#.Net developer. I am new to this world.
where there is no pointer concept.
How to destroy the object created?
*frm pointer object.
The book c++ gui programming with Qt 4.1 is also available for download under the gpl licence(I think) but without the code - just the book itself. Try googling for it.
Though in my opinion your best friend is the Qt Docs and this forum.
sorry friend. how to set this attribute?
got things when i surfed QT docs. Thanks guys
Bookmarks