Frage

Whenever I try to create a new QWebView, the post-build error is

QWidget: Must construct a QApplication before a QPaintDevice

why is this happening?

Yes, i did add QT += webkit to the pro file, and it says here

In qwtconfig.pri

CONFIG += QwtDll this line must be ->

#CONFIG += QwtDll

where is qtwconfig.pri?

FWI i'm on a static build

Here is main()

#include "MyWidget.h"
#include <QPlastiqueStyle>
#include <QtPlugin>
#include <QtWebKit/QWebView>
Q_IMPORT_PLUGIN(qico)


int main(int argc, char *argv[])
{

QApplication app(argc, argv);

app.setStyle(new QPlastiqueStyle);
app.setFont(QFont("Calibri"));
MyWidget widget;
widget.show();

QWebView w;
    w.show();

return app.exec();

}

Keine korrekte Lösung

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top