c++ - How to Run a whole QApplication Asynchronously? -


i'm trying run modified qt-programm library. need not not block main execution.

so want run qapplication , commence execution of main application. how achive this?

my first thought run in seperate thread.

void myclass::execute() {     someclass = someclass::instance();     std::thread t1(&myclass::startapp, this);     someclass->somefunction();     someclass->domorestuff(); } void myclass::startapp() {     qapplication app(argc, argv);     app.exec();     qcoreapplication::quit(); } 

but results in call '__invoke' ambiguous error. though don't know why/where __invoke overwritten , how handle error. :(

so how can accomplish qapplication doesn't block main execution?

design pattern totally wrong, qapplication qcoreapplication not supposed multiplied inside 1 application. should example make own class like:

class librarycore: public qobject { } 

and substitute qapplication class inside future library sources. should implement needed methods in librarycore (ones used inside application) making them work properly..


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -