Sohag generator is one of the advanced Sohag Developer generators which is used to generate a Qt UI interface and Qt/C++ code to interact with the database reducing developers efforts in creating the ui and Qt code to mainpulate data in the database table or view. Sohag generator uses Qt/C++ low level SQL API to execute queries this allows more flexibility for the developers.
This tutrial foloows the following steps to generate the Qt/C++ classes and forms (UI).
- Connect to the database, Press connect button and add the database credentials.
- Create a new project.
- Set project name and location.
- select the table or view in the new class wizard.
- Select the required columns, You may check select all to select all columns.
- You can change the default class name or the base class (Default is QWidget but you also can use QDialog as base class).
- You also can set master detail relationship.
- Add another class by hitting New Class button.
- Save the new created project.
- Select Sohag from generator menu.
- To open the project location, From Project menu hit Open Project Location.
- To open the project in Qt creator, From Project menu hit Open Project In Qt.
- You can compile and run the project in Qt creator as normal.