Saturday, July 5th 2008, 2:19pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

gn6

Beginner

1

Thursday, July 26th 2007, 9:01pm

newb question

I have placed a button on a dialog and I cant figure out how to make it link to another dialog under the same project. I have figured out how to make the window close with the button but not to open up the next one.

Thanks for any help.

This post has been edited 1 times, last edit by "gn6" (Jul 26th 2007, 9:37pm)

  • Go to the top of the page

seguprasad

Trainee

Posts: 103

Location: INDIA

Occupation: Developer

2

Friday, July 27th 2007, 2:08pm

RE: newb question

You need to create the object of the dialog to be opened and call the appropriate methods to display.

Sample Code:
// CDialog1 is the class/dialog name of dialg.
CDialog1 *m_ptrCDialog1;
m_ptrCDialog1 = new CDialog1();
m_ptrCDialog1->setWindowFlags(Qt::Window);
m_ptrCDialog1->showMaximized();
m_ptrCDialog1->exec();
-Segu,
  • Go to the top of the page

gn6

Beginner

3

Tuesday, July 31st 2007, 6:00pm

So what do you mean by: CDialog1 is the class/dialog name of dialog. I am afraid i dont understand. The name of the button I am pressing is "next" and the class is QPushButton. I think it is supposed to be a function but Im not sure and it is named "nextbutton_clicked()". I am trying to make open the "nodegrouplister" widget. I appreciate any clarification.


I guess what I really want to know is the idea or logic of how you use the slots and such in order to open a new window. I will end up writing it in PerlQT so I do not really need to see the c++ stuff unless you think it will help me understand the process better. Thanks again for any help!

This post has been edited 1 times, last edit by "gn6" (Jul 31st 2007, 9:06pm)

  • Go to the top of the page

gn6

Beginner

4

Wednesday, August 1st 2007, 3:01pm

nvm, I have found an easier way to acomplish this. Thanks for your help though!
  • Go to the top of the page

5

Tuesday, March 11th 2008, 5:43pm

Quoted

nvm, I have found an easier way to acomplish this. Thanks for your help though!

Could you show us how you did it? Ive been dealing with this same problem for about two months now, and i just cant seem to figure out how to solve it.
Is it really that hard to open an new window from your mainwindow?
  • Go to the top of the page

Rate this thread