PDA

View Full Version : How to open a second form after a button is clicked in the first one? - FAQ question



Salazaar
13th May 2007, 20:15
Hi. I want to do this:
http://www.qtcentre.org/forum/faq.php?faq=qt_general_category#faq_qt_designer_2f orms
So, I added this:

void Ui_MainWindow::openUi_Dialog(){

static Ui_Dialog *Ui_Dialog = new Ui_Dialog(this);

Ui_Dialog->show();

Ui_Dialog->activateWindow(); // or form2->setActiveWindow() in Qt3

Ui_Dialog->raise();

}




into Ui_MainWindow class. Is that correctly?
No, it isn't. When I do it I have errors that MainWindow class does not have a member called raise, acitvateWindow and show. Even if I paste it out of this class there are errors:
class Ui-Dialog has no member called raise, show and activateWindow. So how should I do it? Regards

jacek
13th May 2007, 20:34
So how should I do it?
Read this: http://doc.trolltech.com/4.2/designer-using-a-component.html

Salazaar
13th May 2007, 20:35
Yeah, I read it but how can I do it in practice? Cause I don't really understand what is described in docs

wysota
13th May 2007, 20:55
This is a double thread.
http://www.qtcentre.org/forum/f-newbie-4/t-problem-displaying-my-main-window-7002.html