Problems with QWebView Component...
-
Hi, I trying to make some tests with the component QWebView, but I got this error:
@
11:32:58: Running build steps for project SVGWeb...
11:32:58: Configuration unchanged, skipping qmake step.
11:32:58: Starting: "/usr/bin/make" -w
make: Entering directory/home/dvl/DELETAR/SVGWeb' g++ -m32 -Wl,-O1 -Wl,-rpath,/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib -o SVGWeb main.o mainwindow.o moc_mainwindow.o -L/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib -lQtGui -L/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib -L/usr/X11R6/lib -lQtCore -lpthread mainwindow.o: In function
MainWindow::MainWindow(QWidget*)':
mainwindow.cpp:(.text+0x1e0): undefined reference toQWebView::QWebView(QWidget*)' mainwindow.cpp:(.text+0x260): undefined reference to
QWebView::setUrl(QUrl const&)'
collect2: ld returned 1 exit status
make: Leaving directory `/home/dvl/DELETAR/SVGWeb'
make: *** [SVGWeb] Error 1
11:32:58: The process "/usr/bin/make" exited with code 2.
Error while building project SVGWeb (target: Desktop)
When executing build step 'Make'
@The Sources:
main.cpp
@
#include <QtGui/QApplication>
#include "mainwindow.h"int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();return a.exec();
}
@mainwindow.cpp
@
#include "mainwindow.h"
#include "ui_mainwindow.h"MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
}MainWindow::~MainWindow()
{
delete ui;
}
@mainwindow.ui
@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>712</width>
<height>543</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QWebView" name="webView">
<property name="url">
<url>
<string>about:blank</string>
</url>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>712</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QToolBar" name="mainToolBar">
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
<widget class="QStatusBar" name="statusBar"/>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
<customwidget>
<class>QWebView</class>
<extends>QWidget</extends>
<header>QtWebKit/QWebView</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
@How to fix it?!
-
I add update the .pro file:
@
QT += core gui webkit
@And Know I got another error in 64bits:
@
11:43:54: Running build steps for project SVGWeb64...
11:43:54: Configuration unchanged, skipping qmake step.
11:43:54: Starting: "/usr/bin/make" -w
make: Entering directory/home/dvl/DELETAR/SVGWeb64' g++ -Wl,-O1 -Wl,-rpath,/home/dvl/bin/QtSDK/Desktop/Qt/4.8.1/gcc/lib -o SVGWeb64 main.o mainwindow.o moc_mainwindow.o -L/home/dvl/bin/QtSDK/Desktop/Qt/4.8.1/gcc/lib -lQtWebKit -lQtGui -L/home/dvl/bin/QtSDK/Desktop/Qt/4.8.1/gcc/lib -L/usr/X11R6/lib64 -lQtCore -lpthread /home/dvl/bin/QtSDK/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference to
gst_element_link_pads_full'
make: Leaving directory `/home/dvl/DELETAR/SVGWeb64'
collect2: ld returned 1 exit status
make: *** [SVGWeb64] Error 1
11:43:54: The process "/usr/bin/make" exited with code 2.
Error while building project SVGWeb64 (target: Desktop)
When executing build step 'Make'
@On 32bits:
@
11:43:39: Running build steps for project SVGWeb...
11:43:39: Starting: "/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/bin/qmake" /home/dvl/DELETAR/SVGWeb/SVGWeb.pro -r -spec linux-g++-32
11:43:39: The process "/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/bin/qmake" exited normally.
11:43:39: Starting: "/usr/bin/make" -w
make: Entering directory/home/dvl/DELETAR/SVGWeb' g++ -m32 -Wl,-O1 -Wl,-rpath,/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib -o SVGWeb main.o mainwindow.o moc_mainwindow.o -L/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib -lQtWebKit -lQtGui -L/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib -L/usr/X11R6/lib -lQtCore -lpthread /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: warning: libgstapp-0.10.so.0, needed by /opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so, not found (try using -rpath or -rpath-link) /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: warning: libgstinterfaces-0.10.so.0, needed by /opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so, not found (try using -rpath or -rpath-link) make: Leaving directory
/home/dvl/DELETAR/SVGWeb'
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: warning: libgstpbutils-0.10.so.0, needed by /opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so, not found (try using -rpath or -rpath-link)
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: warning: libgstvideo-0.10.so.0, needed by /opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so, not found (try using -rpath or -rpath-link)
/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference togst_app_src_push_buffer' /opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference to
gst_app_src_get_type'
/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference togst_stream_volume_get_volume' /opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference to
gst_missing_element_message_new'
/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference togst_video_parse_caps_pixel_aspect_ratio' /opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference to
gst_app_src_set_stream_type'
/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference togst_app_src_set_emit_signals' /opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference to
gst_x_overlay_get_type'
/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference togst_video_sink_get_type' /opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference to
gst_video_format_parse_caps'
/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference togst_element_link_pads_full' /opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference to
gst_stream_volume_get_type'
/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference togst_stream_volume_set_volume' /opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference to
gst_app_src_end_of_stream'
/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference togst_x_overlay_set_xwindow_id' /opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference to
gst_app_src_set_caps'
/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference togst_app_src_set_max_bytes' /opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference to
gst_app_src_set_callbacks'
/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference to `gst_app_src_set_size'
collect2: ld returned 1 exit status
make: *** [SVGWeb] Error 1
11:43:39: The process "/usr/bin/make" exited with code 2.
Error while building project SVGWeb (target: Desktop)
When executing build step 'Make'
@I have installed the QtCreators (32bits and 64bits), on my Suse 64bits.
-
You should be fine with a 64bit Qt Creator for both 32bit and 64bit development.
"gst_" smells of gstreamer. Do you have that installed?
-
Well I could compile on 64bits, on 32bits still getting errors:
@
13:40:43: Running build steps for project SVGWeb...
13:40:43: Configuration unchanged, skipping qmake step.
13:40:43: Starting: "/usr/bin/make" -w
make: Entering directory/home/dvl/DELETAR/SVGWeb' g++ -m32 -Wl,-O1 -Wl,-rpath,/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib -o SVGWeb main.o mainwindow.o moc_mainwindow.o -L/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib -lQtWebKit -lQtGui -L/opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib -L/usr/X11R6/lib -lQtCore -lpthread /usr/lib/libgstvideo-0.10.so.0: undefined reference to
gst_plugin_feature_list_debug'
/usr/lib/libgstvideo-0.10.so.0: undefined reference togst_element_factory_list_get_elements' /opt/QtSDK32/Desktop/Qt/4.8.1/gcc/lib/libQtWebKit.so: undefined reference to
gst_element_link_pads_full'
make: Leaving directory/home/dvl/DELETAR/SVGWeb' /usr/lib/libgstvideo-0.10.so.0: undefined reference to
gst_element_factory_list_filter'
/usr/lib/libgstpbutils-0.10.so.0: undefined reference to `gst_pad_link_full'
collect2: ld returned 1 exit status
make: *** [SVGWeb] Error 1
13:40:44: The process "/usr/bin/make" exited with code 2.
Error while building project SVGWeb (target: Desktop)
When executing build step 'Make'
@