QtWebView iOS C++



  • I am struggling to make a QtWebView be visible (or properly positioned?) in iOS (via the simulator). I am using the Tech Preview of the new QtWebView (using QT += webview_private). Following is my main.cpp code:

    QApplication a(argc, argv);
        MainWindow w;
        w.show();
    

    Here is my mainwindow.cpp code:

    QWebView* view = new QWebView(this);
        view->setParentView(this);
        view->setGeometry(QRect(0,0,300,300));
        view->setVisible(true);
        view->setVisibility(QWindow::Visibility::Maximized);
        view->setUrl(QUrl("http://www.google.com"));
    

    No matter what, the screen on the iOS simulator is blank. To further confuse things, the documentation states that a QWebView (maybe not the same as the new QtWebView?) is derived from QWidget, which is false. Thus, using standard QLayout and/or setCentralWidget is not an option. How do I show this thing?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.