[Solved]Qt designer generates two classes with same name from two different ui files.
-
wrote on 30 Mar 2013, 11:28 last edited by
I have weird problem with adding new form to my project, I have two different widgets created in qt designer, one is mainTab, I added it to project time ago, second is history I am trying to add now. The problem is the designer generated .h files from the .ui files but both have same class names, Ui_Form, so I can't use it in main window together. I run qmake but nothing changed. What can I do?
errors:
/root/MD-build-desktop/ui_history.h:25: error: redefinition of ‘class Ui_Form’
/root/MD-build-desktop/ui_mainTab.h:31: error: previous definition of ‘class Ui_Form’ ()
/root/MD-build-desktop/ui_history.h:68: error: redefinition of ‘class Ui::Form’ (this makes new class Form as public class of Ui_Form in namespace Ui)
/root/MD-build-desktop/ui_mainTab.h:327: error: previous definition of ‘class Ui::Form’ -
wrote on 30 Mar 2013, 12:08 last edited by
You can rename one of the files to something other than Form
-
wrote on 30 Mar 2013, 13:26 last edited by
How? One file is history.ui and other maintab.ui, they generate ui_history.h and ui_maintab.h but classes declared in those files are both named Ui_Form, I have no file named Form.
-
wrote on 30 Mar 2013, 14:21 last edited by
Maybe if you open them in Designer you can change "Form" in properties?
-
wrote on 30 Mar 2013, 14:29 last edited by
Ok find out where it is set, I'm just lame^
1/5