PDA

View Full Version : Static with domtraversal example gives QApplication before QPaintDevice error



steve9295
19th September 2012, 22:30
I am using QtCreator 2.3.1 (based on Qt 4.7.4). I downloaded Qt libraries 4.8.3 for Windows (VS 2010, 235 MB) and built for static linking, configured by:

configure -debug-and-release -opensource -static -platform win32-mscvc2010

I want to be able to make static executables. I modified my QTCreator build to use this version of the libraries. I tried a couple of the examples, calculatorform and simpletreemodel worked fine, ran locally and when transferred to another system that doesn't have Qt installed. However I wanted to use the domtraversal example and this even fails to run locally in QtCreator giving the following error:

8230

Any help would be appreciated? Do I need to make something else correctly for this to work?

Cheers

Steve

d_stranz
20th September 2012, 02:40
Have you actually stepped into main() with the debugger to see where this error occurs?

steve9295
20th September 2012, 23:30
I hadn't as the error seemed fairly explicit in that sense. Have now. The final call from the example is the last line in the following code:



void setupUi(QMainWindow *Window)
{
if (Window->objectName().isEmpty())
Window->setObjectName(QString::fromUtf8("Window"));
Window->resize(800, 600);
centralwidget = new QWidget(Window);
centralwidget->setObjectName(QString::fromUtf8("centralwidget"));
verticalLayout_2 = new QVBoxLayout(centralwidget);
verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
verticalLayout_2->setContentsMargins(-1, 4, -1, 4);
webView = new QWebView(centralwidget);


Step into doesn't seem to work at that point.

A QApplication has been constructed in main before the above code:



QApplication app(argc, argv);