Would be better be without QWidget dependencies. The main application could be QGuiApplication