Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. How to change drawing size in WebEngineView
Forum Updated to NodeBB v4.3 + New Features

How to change drawing size in WebEngineView

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 292 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.
  • Y Offline
    Y Offline
    ynakane
    wrote on last edited by
    #1

    Hello.
    Recently I started using WebEngine for SVG rendering.
    At first I was using QtSVG, but it only supports SVG Tiny, so I'm investigating WebEngineView.

    I was able to view the SVG image by using WebEngineView,
    but It seems that the size cannot be changed because it depends on the drawing size described in the SVG file.

    This is what I want to do
    test.png
    Here is my QML.

    import QtQuick 2.15
    import QtQuick.Controls 2.15
    import QtWebEngine 1.10
    
    Page {
        width: 1760
        height: 920
    
        title: qsTr("Page 1")
    
        header:Label {
            text: qsTr("Hello QtWebEngine")
        }
        WebEngineView
        {
            id: webengineSVG
            width: 800
            height: 800
            url: "qrc:/foo.svg"
        }
    }
    

    Does anyone know the solution?

    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