Using individual ui files
Solved
General and Desktop
-
Created a ui named display.ui using File ->New File in Creator.
The pro file section looks like this:FORMS += \ additem.ui \ review.ui \ mainwindow.ui \ imagedisplay.ui \ display.ui
and the header of the file mainwindow.cpp where I want to use the form looks like this:
#include "mainwindow.h" #include "ui_mainwindow.h" #include "ui_display.h" #include <imagedisplay.h>
When I try to use display.ui from mainwindow.h I use:
ui::
but in the dropdown display.ui is not listed. What am I missing? Thank you.
-
Hi,
I usually use one ui-file with one cpp-file and one header-file, like:
display.ui
display.h there use ui::DisplayClass or what the name is
display.cpp
and
mainwindow.ui
mainwindow.h there use ui::MainWindowClass or what the name is
mainwindow.cpp
I would not try to mix-up the two classes Display and MainWindow.
-Michael.