quantity
18th March 2011, 03:30
Here I have a problem:
I want to create a QT library used by other C or C++ program. In this library, I use qtwebkit module to do some html and http work. According to QT's requirement, there must be a QApplication (not QCoreApplication) before qtwebkit objects, such as QWebPage can be used. However, we plan to use the library in a console application. In this situation, there's no main function in the library where I can define a QApplication object myself (QApplication a(argc, argv);).
Is there any suggestion on this? Can I init a QApplication object in the library myself? What's more, I'm using other threads in the library, which is more confusing.:(
I want to create a QT library used by other C or C++ program. In this library, I use qtwebkit module to do some html and http work. According to QT's requirement, there must be a QApplication (not QCoreApplication) before qtwebkit objects, such as QWebPage can be used. However, we plan to use the library in a console application. In this situation, there's no main function in the library where I can define a QApplication object myself (QApplication a(argc, argv);).
Is there any suggestion on this? Can I init a QApplication object in the library myself? What's more, I'm using other threads in the library, which is more confusing.:(