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. QWebView: Specific Website isn’t displayed anymore
Forum Updated to NodeBB v4.3 + New Features

QWebView: Specific Website isn’t displayed anymore

Scheduled Pinned Locked Moved Unsolved Qt WebKit
3 Posts 2 Posters 1.1k Views 1 Watching
  • 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.
  • nonesenseN Offline
    nonesenseN Offline
    nonesense
    wrote on last edited by
    #1

    QWebView specific Website isn’t displayed anymore

    Hello together,

    I have created a simple Application that shoes a timetable with real-time data of a railway station.

    Sins a view weeks the widget keeps being white. So I think there were some changes on the web server making it incompatible for QWebView.
    Even the start page (www.vrsinfo.de) cannot be displayed anymore.

    Is there a possibility to get the reason, why the loading of the website fails?

    Regards,
    Jens

    QString link1="http://www.vrsinfo.de/fahrplan/abfahrtsmonitor/anzeige/vrs_info/Departuremonitor/show/vrs_info-showid/YRmV28WCZkFFTpqwToLyUbb894PCkyj0.html";
    this->webView0->load(QUrl(link1));
    
    K 1 Reply Last reply
    0
    • nonesenseN nonesense

      QWebView specific Website isn’t displayed anymore

      Hello together,

      I have created a simple Application that shoes a timetable with real-time data of a railway station.

      Sins a view weeks the widget keeps being white. So I think there were some changes on the web server making it incompatible for QWebView.
      Even the start page (www.vrsinfo.de) cannot be displayed anymore.

      Is there a possibility to get the reason, why the loading of the website fails?

      Regards,
      Jens

      QString link1="http://www.vrsinfo.de/fahrplan/abfahrtsmonitor/anzeige/vrs_info/Departuremonitor/show/vrs_info-showid/YRmV28WCZkFFTpqwToLyUbb894PCkyj0.html";
      this->webView0->load(QUrl(link1));
      
      K Offline
      K Offline
      Konstantin Tokarev
      wrote on last edited by
      #2

      @nonesense These pages work fine here, please provide minimal example of C++ project that is broken for you and can be built stand-alone.

      1 Reply Last reply
      0
      • nonesenseN Offline
        nonesenseN Offline
        nonesense
        wrote on last edited by
        #3

        Hello Konstantin,
        Thank you for your reply.
        Hm, basic C++. I am not an expert, just using Qt Creators assistant.
        Let my try:

        VrsViewWin.pro

        QT       += core gui webkit webkitwidgets
        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
        TARGET = VrsViewWin
        TEMPLATE = app
        SOURCES += main.cpp\
                mainwindow.cpp
        HEADERS  += mainwindow.h
        FORMS    += mainwindow.ui
        

        main.cpp

        #include "mainwindow.h"
        #include <QApplication>
        int main(int argc, char *argv[]){
            QApplication a(argc, argv);
            MainWindow w;
            w.show();
            return a.exec();
        }
        

        mainwindow.h

        #ifndef MAINWINDOW_H
        #define MAINWINDOW_H
        #include <QMainWindow>
        namespace Ui {
        class MainWindow;
        }
        class MainWindow : public QMainWindow
        {
            Q_OBJECT
        public:
            explicit MainWindow(QWidget *parent = 0);
            ~MainWindow();
        private:
            Ui::MainWindow *ui;
        };
        #endif // MAINWINDOW_H
        

        mainwindow.cpp

        #include "mainwindow.h"
        #include "ui_mainwindow.h"
        MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow){
            ui->setupUi(this);
            ui->webView->setUrl(QUrl("http://www.vrsinfo.de"));
            //ui->webView->setUrl(QUrl("http://www.google.de")); // Works fine
        }
        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>1024</width>
            <height>768</height>
           </rect>
          </property>
          <property name="windowTitle">
           <string>MainWindow</string>
          </property>
          <widget class="QWidget" name="centralWidget">
           <widget class="QWebView" name="webView">
            <property name="geometry">
             <rect>
              <x>0</x>
              <y>0</y>
              <width>1024</width>
              <height>768</height>
             </rect>
            </property>
            <property name="url">
             <url>
              <string>about:blank</string>
             </url>
            </property>
           </widget>
          </widget>
         </widget>
         <layoutdefault spacing="6" margin="11"/>
         <customwidgets>
          <customwidget>
           <class>QWebView</class>
           <extends>QWidget</extends>
           <header>QtWebKitWidgets/QWebView</header>
          </customwidget>
         </customwidgets>
         <resources/>
         <connections/>
        </ui>
        
        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