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 unable to load page only one page
QtWS25 Last Chance

qwebview unable to load page only one page

Scheduled Pinned Locked Moved Solved Qt WebKit
4 Posts 2 Posters 1.5k 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.
  • petrzmaxP Offline
    petrzmaxP Offline
    petrzmax
    wrote on last edited by petrzmax
    #1

    Hi!
    I'm working on some app which will collect data from site https://olimp.us/.
    I have OpenSSl installed and plugins, and java scripts are turned on. I also use latest User agent. But when i'm trying to load this page, there is only a white page.
    Any suggestion what should I turn on or something?
    Thanks for help.

    ? 1 Reply Last reply
    0
    • petrzmaxP petrzmax

      Hi!
      I'm working on some app which will collect data from site https://olimp.us/.
      I have OpenSSl installed and plugins, and java scripts are turned on. I also use latest User agent. But when i'm trying to load this page, there is only a white page.
      Any suggestion what should I turn on or something?
      Thanks for help.

      ? Offline
      ? Offline
      A Former User
      wrote on last edited by A Former User
      #2

      @petrzmax Hi! Just tested with minimal code and QtWebEngine and that works:

      import QtQuick 2.5
      import QtQuick.Controls 1.4
      import QtWebEngine 1.3
      
      ApplicationWindow {
          visible: true
          width: 600
          height: 400
      
          WebEngineView {
              anchors.fill: parent
              url: "https://olimp.us/"
          }
      }
      

      Maybe you can show us some of your code so we can try to figure out what's going wrong.

      1 Reply Last reply
      0
      • petrzmaxP Offline
        petrzmaxP Offline
        petrzmax
        wrote on last edited by petrzmax
        #3

        Hi, thanks for reply!
        I have a widget called QWebview, so its added in designer, but here is the code:

        MainWindow::MainWindow(QWidget *parent) :
            QMainWindow(parent),
            ui(new Ui::MainWindow)
        {
            ui->setupUi(this);
            QWebSettings *settings = QWebSettings::globalSettings();
            settings->setAttribute(QWebSettings::JavascriptEnabled, true);
            settings->setAttribute(QWebSettings::PluginsEnabled, true);
            settings->setAttribute(QWebSettings::AutoLoadImages, true);
            settings->setAttribute(QWebSettings::JavaEnabled, true);
            settings->setAttribute(QWebSettings::JavascriptCanOpenWindows, false);
        
        
            ui->webView->load(QUrl("https://olimp.us/"));
            //ui->customPlot->yAxis->setRange(1.0,1.2);
            //ui->customPlot->yAxis->setLabel(QString("CT/T kills"));
        }
        

        Maybe it's because I use old version of Qt? I have just installed Qt 5.7 but there is no QWebview widget.

        Edit: Ok, so it's not working on Mingw compiler. I will try on Vs 2015

        Edit v2: Thanks porting it to QwebEngine solved my problem.

        ? 1 Reply Last reply
        0
        • petrzmaxP petrzmax

          Hi, thanks for reply!
          I have a widget called QWebview, so its added in designer, but here is the code:

          MainWindow::MainWindow(QWidget *parent) :
              QMainWindow(parent),
              ui(new Ui::MainWindow)
          {
              ui->setupUi(this);
              QWebSettings *settings = QWebSettings::globalSettings();
              settings->setAttribute(QWebSettings::JavascriptEnabled, true);
              settings->setAttribute(QWebSettings::PluginsEnabled, true);
              settings->setAttribute(QWebSettings::AutoLoadImages, true);
              settings->setAttribute(QWebSettings::JavaEnabled, true);
              settings->setAttribute(QWebSettings::JavascriptCanOpenWindows, false);
          
          
              ui->webView->load(QUrl("https://olimp.us/"));
              //ui->customPlot->yAxis->setRange(1.0,1.2);
              //ui->customPlot->yAxis->setLabel(QString("CT/T kills"));
          }
          

          Maybe it's because I use old version of Qt? I have just installed Qt 5.7 but there is no QWebview widget.

          Edit: Ok, so it's not working on Mingw compiler. I will try on Vs 2015

          Edit v2: Thanks porting it to QwebEngine solved my problem.

          ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          @petrzmax Glad to hear you solved it. Please use the "topic tools" button to mark this thread as solved. Cheers!

          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