Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QtWebView iOS C++
Forum Updated to NodeBB v4.3 + New Features

QtWebView iOS C++

Scheduled Pinned Locked Moved Mobile and Embedded
ioswebview
1 Posts 1 Posters 955 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.
  • W Offline
    W Offline
    whitecastleroad
    wrote on last edited by
    #1

    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?

    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