hi,
how should i open a form(2) by clicking the button on the form(1)
i had made this in qt3.3 easily like ( form2 dialog1( this );
dialog1.exec();
)
but it is little confusing in qt4.3.2
hi,
how should i open a form(2) by clicking the button on the form(1)
i had made this in qt3.3 easily like ( form2 dialog1( this );
dialog1.exec();
)
but it is little confusing in qt4.3.2
That code is valid in 4.x too. What problems did you encounter?
this is my problem, i am also attaching my program
in header file i have included form2 header file, but though it giving error/************************************************** *****
test5.cpp: In member function `void test5:peninternet()':
test5.cpp:21: error: `dialog1' undeclared (first use this function)
test5.cpp:21: error: (Each undeclared identifier is reported only once for each function it appears in.)
test5.cpp:21: error: expected `;' before "inter1"
test5.cpp:22: error: `inter1' undeclared (first use this function)
*/
Last edited by marcel; 21st December 2007 at 10:11. Reason: reformatted to look better
Who is dialog1? You haven't declared it anywhere. I assume you want to show the dialog defined by dialog1.ui. You have to implement it - do as you did for the main window.
Since you use exec() to show the dialog, you can create the dialog on the stack(declare it as variable in that function).
Bookmarks