新しい QWebView を作成しようとするたびに、ビルド後のエラーは
QWidget: Must construct a QApplication before a QPaintDevice
なぜこうなった?
はい、私はプロファイルに追加QT += webkit
しました、そしてそれはここに言います
qwtconfig.pri で
CONFIG += QwtDll この行は ->
#CONFIG += QwtDll
qtwconfig.pri はどこですか?
FWI 私は静的ビルドを使用しています
ここに 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();
}