View Single Post
Posts: 146 | Thanked: 149 times | Joined on Apr 2010
#5
I am developing my own application, that listens to text messages and then executes different kind of actions depending on the text given in the message.

Usually the application runs hidden in the background, but it might be woken up (shown in FullScreen) by certain commands in the text messages.

The application is ready and working if it has been run after the reboot, but it does not want to start during startup.

Here is the main.cpp:
Code:
#include <QApplication>
#include "ConfigurationWizard.h"
#include "BackgroundTask.h"
#include "Settings.h"

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QApplication ::setOverrideCursor(QCursor(Qt::BlankCursor));
    
    Settings settings;
    
    ConfigurationWizard window(settings);
    BackgroundTask backgroundTask(settings);
    
    QObject::connect(&backgroundTask, SIGNAL(showConfig()), &window,  SLOT(showFullScreen()));

    return app.exec();
}
Settings and Background classes inherit QOBject, while ConfigurationWizard class inherits QMainWindow.