Home

Qt_Ada.Core_Application

The package Qt_Ada.Core_Application provides to the application the way to creates and executes instance of the QCoreApplication class. It hides the complexity of the handling command line parameters and program's return code from the application. Application must use this package only if it doesn't use any classes from the QtGui module, otherwise it must use Qt_Ada.Application package instead. Here is the package declaration:

package Qt_Ada.Core_Application is

   procedure Initialize;
   --  Creates global instance of the QCoreApplication class with options
   --  specified in the command line.

   procedure Execute;
   --  Executes main event loop until it don't be terminated. Set program
   --  exit code to the specified by the user exit code.

   procedure Finalize;
   --  Destroies global instance of the QCoreApplication class.

end Qt_Ada.Core_Application;

The procedure Initialize creates an instance of the QCoreApplication class using program's command line parameters.

The procedure Execute run QCoreApplication::exec operation and save returned code as program's return code.

The procedure Finalize destroies instance of the QCoreApplication class.


QtAda 2.1