Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QWebEngineView prevents Q3DScatter from being displayed
Forum Updated to NodeBB v4.3 + New Features

QWebEngineView prevents Q3DScatter from being displayed

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 345 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.
  • R Offline
    R Offline
    Reda94
    wrote on last edited by Reda94
    #1

    I have a Qt Main Window containing a GridLayout inside of which I added two Group Boxes (one on the left side and the other on the right). I'm aiming to display a Q3DScatter graph in the right group box and a QWebEngineView in the left one, so I've added a horizontal layout in both Group Boxes, then from my main window constructor, I created a widget container for my Q3DScatter graph which I then embedded to the horizontal layout of my right Group Box, and created a QWebEngineView which I added in turn to the horizontal layout of my left Group Box. Here's the full code of my window constructor:

    GraphWindow::GraphWindow(QWidget *parent) :
        QMainWindow(parent),
        ui(new Ui::GraphWindow)
    {
        ui->setupUi(this);
    
        //Adding the graph to my right horizontal layout (contained in my right Group Box) :
    
        Q3DScatter *graph = new Q3DScatter();
        QWidget *container = QWidget::createWindowContainer(graph);
        ui->right_horizontalLayout->addWidget(container, 1);
    
        //Adding the web view to my left horizontal layout (contained in my left Group Box) :
    
        QWebEngineView *view = new QWebEngineView(this);
        view->load(QUrl("path.to.some.html.file"));
        ui->left_horizontalLayout->addWidget(view, 1);
    }
    

    When executing, the QWebEngineView "page" is displayed properly but the right group box of my window (which is supposed to contain the Q3DScatter graph) appears to be empty. When I comment the QWebEngineView part of my code, the graph is displayed properly, so I deduced that there has to be something wrong with QWebEngineView which apparently doesn't allow my Q3DScatter graph to be displayed. Any help would be very welcome.

    PS: Here are two screenshots, the first is what I get when executing the full code, and the second is when I comment the QWebEngineView part of the code (no web view):

    Full code:

    0_1492765478864_Capture d’écran 2017-04-21 à 9.52.03 AM.png

    Code without adding QWebEngineView:

    0_1492765507825_Capture d’écran 2017-04-21 à 9.48.26 AM.png

    EDIT: I tried resizing the window by completely shrinking it and then re-expanded it, and to my surprise the graph appeared! This is obviously a Qt Bug related to QWebEngineView... Has anyone been confronted to this kind of bug before? Shrinking and then expanding the window is obviously not a solution, I'd really appreciate some actual workaround.

    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