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. How to resize QQuickView?
Forum Updated to NodeBB v4.3 + New Features

How to resize QQuickView?

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

    Hi,

    I tried to set the size of a QQuickView window in a container widget, but it doesn't resize. I would like to fill complete container widget with QQuickView window, like a foil over a ground.
    Also all other tests doesn't work, for example the method setBaseSize() or away over geometry()->setSize().

    @
    //the container widget is a graphics view with graphics scene inside

    QGraphicsScene *scene = new QGraphicsScene(0, 0, 500, 500, this);
    QGraphicsView *view = new QGraphicsView(scene, this);
    view.setBackgroundBrush(QBrush(QColor(0, 0, 0, 0)));
    view.setFixedSize(scene->width(), scene->height());

    //the qquickview instance

    QQuickView *qview = new QQuickView;
    qview->setColor(QColor(0, 200, 0);
    qview->setMinimumSize(QSize(500, 500));
    qview->setMaximumSize(QSize(500, 500));

    //add qquickview to container

    view->createWindowContainer(qview, view);
    @

    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