PDA

View Full Version : Multiple ui files and calling a variable from a different class



bmn
9th December 2010, 16:16
Hello all

If I have a program with multiple ui files
how do i control which is shown, and when, using a function??


also could anyone tell me a simple way to call a variable from a different class please?


thanks :)

FelixB
9th December 2010, 16:24
If I have a program with multiple ui files
how do i control which is shown, and when, using a function??

more details, please. What does "multiple ui files" mean? do you have several dialogs?


also could anyone tell me a simple way to call a variable from a different class please?

very simple:

MyClass class;
int outerVariable = class.innerVariable

bmn
9th December 2010, 16:49
more details, please. What does "multiple ui files" mean? do you have several dialogs?

In Qt i have i project where i would like to use more than one ui file (i mean the files under forms) since i would like to split the pages in my stacked widget into two categories.
How do i set up my class so that i can point to widgets in both ui files? As an example, i have a button in my main ui file that i would like to take me to a page in the stacked widget in the ot other ui files from the project.
I'm not able to point to the widgets from the other ui file, i believe that i somehow have to include it, make an instance or something but i don't know how and where to do it.



very simple:

MyClass class;
int outerVariable = class.innerVariable

I will try this now, thanks:)