Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML Quick2 WebView and zoom in/out
Forum Update on Monday, May 27th 2025

QML Quick2 WebView and zoom in/out

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 1.6k 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.
  • W Offline
    W Offline
    wimvalcke
    wrote on last edited by
    #1

    A WebView element now renders the complete page and fits it onto the width set on the WebView. It implements flicking up/down. Is it still possible to flick right/left ? Suppose we have a limited screen, how can we set the zooming of the WebView element ? It seems there is no example for Quick2 how to do this.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sandy.martel
      wrote on last edited by
      #2

      Any solution for that? been looking for hours.
      I have:

      @
      import QtQuick 2.0
      import QtWebKit 3.0

      Rectangle {
      width: 300; height: 300

      Text {
      anchors.fill: parent
      anchors.leftMargin: parent.width / 2
      text: "<h1>title</h1>"
      }
      WebView {
      anchors.fill: parent
      anchors.rightMargin: parent.width / 2
      url: "file:///Users/sandy/test.html"
      }
      }
      @

      where test.html contains : "<h1>title</h1>"

      and I want both side to behave the same (like Text) when I resize the window. With Qt5.1.1 the WebView scaling change as I resize. So basically, I want to have a WebView that behaves like a browser window or as it was in Qt4.8.x.

      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