Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. WebKit (Qt 5.3) not works on Windows XP SP3.

WebKit (Qt 5.3) not works on Windows XP SP3.

Scheduled Pinned Locked Moved Qt WebKit
4 Posts 3 Posters 2.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VladimirSk
    wrote on last edited by
    #1

    WebKit (Qt 5.3) not works on Windows XP SP3.

    Hello!

    A very simple 32-bit application has been written.
    This application uses QtWebView to display WEB page in main window.
    The application has been developed on Windows, Qt 5.3.1 for Windows 32-bit (VS 2013).
    The application has been builded in Visual Studio 2013 (Update 3) with toolset v120_xp.
    The application works correctly on Windows 7 (32-bit and 64-bit).

    But this application not works on Windows XP SP3 32-bit - terminates during displaying WEB page on QWebView.
    If I comment the line 'ui.webView->setUrl(QUrl(...))' in the source code (see below) - this application starts without problems.

    How to fix this problem?

    Thanks!

    Source code:

    // main.cpp

    @
    #include "qtwebkit.h"
    #include <QtWidgets/QApplication>

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);
    a.addLibraryPath(QCoreApplication::applicationDirPath() + "/plugins");
    QtWebKit w;
    w.show();
    return a.exec();
    }
    @

    // qtwebkit.h

    @
    #ifndef QTWEBKIT_H
    #define QTWEBKIT_H

    #include <QtWidgets/QMainWindow>
    #include "ui_qtwebkit.h"

    class QtWebKit : public QMainWindow
    {
    Q_OBJECT
    public:
    QtWebKit(QWidget parent = 0);
    ~QtWebKit();
    protected:
    void showEvent(QShowEvent
    event);
    private:
    Ui::QtWebKitClass ui;
    };

    #endif // QTWEBKIT_H
    @

    // qtwebkit.cpp

    @
    #include "qtwebkit.h"

    #include <QObject>
    #include <QWebView>

    QtWebKit::QtWebKit(QWidget *parent)
    : QMainWindow(parent)
    {
    ui.setupUi(this);
    }

    QtWebKit::~QtWebKit()
    {
    }

    void QtWebKit::showEvent(QShowEvent* event)
    {
    ui.webView->setVisible(true);
    ui.webView->setUrl(QUrl("http://www.ibm.com/us/en/"));
    }
    @

    // qtwebkit.ui

    @
    <?xml version="1.0" encoding="UTF-8"?>
    <ui version="4.0">
    <class>QtWebKitClass</class>
    <widget class="QMainWindow" name="QtWebKitClass">
    <property name="geometry">
    <rect>
    <x>0</x>
    <y>0</y>
    <width>600</width>
    <height>400</height>
    </rect>
    </property>
    <property name="windowTitle">
    <string>QtWebKit</string>
    </property>
    <widget class="QWidget" name="centralWidget">
    <layout class="QVBoxLayout" name="verticalLayout">
    <property name="leftMargin">
    <number>0</number>
    </property>
    <property name="topMargin">
    <number>0</number>
    </property>
    <property name="rightMargin">
    <number>0</number>
    </property>
    <property name="bottomMargin">
    <number>0</number>
    </property>
    <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>600</width>
    <height>21</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>QtWebKitWidgets/QWebView</header>
    </customwidget>
    </customwidgets>
    <resources>
    <include location="qtwebkit.qrc"/>
    </resources>
    <connections/>
    </ui>
    @

    1 Reply Last reply
    0
    • T Offline
      T Offline
      ThatDude
      wrote on last edited by
      #2

      Please check the information available on "Supported Platforms":http://qt.digia.com/product/Qt-Framework/Supported-Platforms/

      Windows XP 32bit is supported by Qt 4.8 and only for
      VS 2008
      VS 2010
      MinGW 4.4

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sandy.martel
        wrote on last edited by
        #3

        I have no problem running your example on WinXP with my Qt-5.3.1 compiled with VS2013.

        What your configure cmd looks like?
        Are you sure that all components were compiled for WinXP ?

        1 Reply Last reply
        0
        • V Offline
          V Offline
          VladimirSk
          wrote on last edited by
          #4

          Big thanks to all!

          I found the problem.
          Qt WebKit not working only when I used OpenSSL (v1.0.1e), which has been compiled with Visual Studio v120_xp toolset. All other applications and modules are working successfully with this library.
          Qt WebKit works successfully if I use, for example, the "old" version of OpenSSL (v1.0.1e), which has been compiled with v100 toolset.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved