[Development] Test Application Failing to load QtCore Lib of qt-4.8.4 Event Dispatcher Assertion
Amogh Kudari
amogh.kudari5 at gmail.com
Tue Feb 19 13:32:29 CET 2013
Hi All,
I am testing my Qt built libraries with a simple test
application, which basically creates a window with a button.
Its as shown
/****************ButtonApp.c*********************/
#include <QtGui>
extern "C" void WebKitTestApp(void *pdata)
{
int argv=1;
char *args[]={"WebKitTestApp_button.exe"};
QApplication app(argv, args);
QTextEdit textEdit;
QPushButton quitButton("Quit");
QObject::connect(&quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
QVBoxLayout layout;
layout.addWidget(&textEdit);
layout.addWidget(&quitButton);
QWidget window;
window.setLayout(&layout);
window.show();
app.exec();
return;
}
/******Test Application**********/
/**************TestButtonApp.c****************/
#include <stdio.h>
extern "C" void WebKitTestApp(void *pdata);
int main(int argc, char** argv)
{
printf("In main\n");
if(argc ==1)
printf("argc[%d] argv[%s]\n",argc,(char *)*argv);
WebKitTestApp((void*)argv);
}
I am creating a library of ButtonApp.c called as ButtonApp.lib on
*Windows *using
*cl compiler *and then linking with *Qt-4.8.4* libs to create
TestButtonApp.exe executable.
But on executing the exe file It pops up saying
"Debug Error!
Program:
workspace\TestButtonApp.exe
Module : 4.8.4
File: global\qglobal.cpp
Line : 2303
ASSERT : "QCoreApplicationPrivate::eventDispatcher != 0" in file
kernel\qcoreapplication.cpp , line :765
(Press Retry to Debug the application) "
I am unable to figure out why am I getting this error.
Should I create any event Dispatcher in my ButtonApplication or is there
any other way to get around this problem.
Any help or suggestions are greatly appreciated...
Thanks in advance....
Amogh.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130219/d5c27a30/attachment.html>
More information about the Development
mailing list