Design the form using QT designer, save it in the % name % folder, and name it % name %. UI
In the % name % folder, create the main function.
When a project is created using qmake (qmake-project; qmake % name %. pro), qmake will automatically detect the user interface file % name %, UI and can generate appropriate makefile rules to call the QT User Interface Compiler (UIC ). UIC converts the % name %. UI file to C ++ and stores the replace result in the UI _ % name %. h file.
The generated UI _ % name %. the H file contains the definition of Class UI: % name %, which is a file with % name %. the UI file is equivalent to a C ++ file. This class declares some member variables, which store the sub-windows in the form and the sub-variables, and the setui () function used to initialize the form.
The generated class does not have any base class. When using this form in the main. cpp file, you can create a qdialog object and pass it to the setui () function.
By writingCodeTo make the dialog box have appropriate functions. The most convenient way is to create a new class that inherits the class from both qdialog and UI: gotocelldialog and implement the missing functions.