I have a rather convoluted question
I am using RHEL 6 and Qt4.8
Also using QtCreator.
I have a project where I have a QListWidget implemented on a ui form. All my functionality works as I expect it.
I have another project where I have a regular ui implemented. I added another UI to that project via Add New Class.
1) First I want to show the new ui via a button press on the existing GUI. I cannot get the added ui to be recognized by the existing UI.
2) Then I want to put my QListWidget from the other project onto this added UI.
If I get #1 solved, I think I can get #2 done myself.
Thanks for any help
Re: I have a rather convoluted question
What does "another UI" mean?
A window of some kind (dialog, mainwindow)?
Or a widget that needs to be embedded into a container somewhere?
What do you mean with "cannot get it recognized"?
Are there any errors?
Cheers,
_
Re: I have a rather convoluted question
Quote:
Originally Posted by
anda_skoa
What does "another UI" mean?
A window of some kind (dialog, mainwindow)?
Or a widget that needs to be embedded into a container somewhere?
What do you mean with "cannot get it recognized"?
Are there any errors?
Cheers,
_
The original project is a QMainWindow type of project. everything is part of the .pro file and compiles.
The compiler error is
invalid use of lp1->ui->listPanel1->show();
I try to get the MainWindow code to recognize the listPanel1 panel with this line of code in the .h file for the MainWindow cpp file.
listPanel1* lp1;
listPanel1 is the name of the second ui panel class and its .h file is included in the .h file for the MainWindow class.
Thanks
Re: I have a rather convoluted question
Quote:
The compiler error is
invalid use of lp1->ui->listPanel1->show();
"listpanel1" is the name of a class. The compiler is telling you you can't use the name of a class in the context of the statement you have written.
Re: I have a rather convoluted question
Quote:
Originally Posted by
d_stranz
"listpanel1" is the name of a class. The compiler is telling you you can't use the name of a class in the context of the statement you have written.
This brings me back to my original question. How do I get my code to recognize this additional ui so that I can display it? Is my declaration in the header file wrong as I have it written above?
Added after 1 27 minutes:
Quote:
Originally Posted by
emp1953
This brings me back to my original question. How do I get my code to recognize this additional ui so that I can display it? Is my declaration in the header file wrong as I have it written above?
It looks like I solve the issue. It was with my header file declaration.
Thanks to all