1 Replies - 949 Views - Last Post: 19 April 2013 - 03:16 PM Rate Topic: -----

#1 David7823  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 4
  • Joined: 01-October 12

C++/Qt - 'QWebView' file not found

Posted 19 April 2013 - 03:01 PM

Hello!
I tried to make a QWebView, but as you can see, it didn't work. I need help getting it to work.
Compile Output:
17:58:12: Running steps for project Practice...
17:58:12: Configuration unchanged, skipping qmake step.
17:58:12: Starting: "/usr/bin/make" -w
make: Entering directory `/Users/davidfields/Desktop/C++ Projects/Practice-build-Desktop_Qt_5_0_1_clang_64bit-Debug'
clang++ -c -pipe -mmacosx-version-min=10.6 -g -gdwarf-2 -Wall -W -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG -I../../../Qt5.0.1/5.0.1/clang_64/mkspecs/macx-clang -I../Practice -I. -o main.o ../Practice/main.cpp
../Practice/main.cpp:1:10: fatal error: 'QWebView' file not found
#include <QWebView>
         ^
1 error generated.
make: *** [main.o] Error 1
make: Leaving directory `/Users/davidfields/Desktop/C++ Projects/Practice-build-Desktop_Qt_5_0_1_clang_64bit-Debug'
17:58:12: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project Practice (kit: Desktop Qt 5.0.1 clang 64bit)
When executing step 'Make'


main.cpp:
#include <QWebView>

#include <iostream>
using namespace std;

int main()
{
    QApplication a(argc, argv);

    QWebView *view = new QWebView(parent);
    view->load(QUrl("http://google.com/"));
    view->show();

    return 0;
}


Practice.pro:
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.cpp

OTHER_FILES += \

QT += webkitwidgets


Please help! I am trying to get it to work, but I just can't.

Is This A Good Question/Topic? 0
  • +

Replies To: C++/Qt - 'QWebView' file not found

#2 Davidf7823  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 05-April 13

Re: C++/Qt - 'QWebView' file not found

Posted 19 April 2013 - 03:16 PM

Never mind! I figured out my problem. I forgot I was using a console application, not a GUI app. Solved.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1