Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] Resizing QQuickView or QWindow
Forum Updated to NodeBB v4.3 + New Features

[Solved] Resizing QQuickView or QWindow

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 3.2k 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.
  • Z Offline
    Z Offline
    Zamx
    wrote on last edited by
    #1

    I'm having trouble resizing a QQuickView. The functions resize and setGeometry have no effect. Only if I encapsulate the functions between a hide and show it works.

    Currently I'm using this piece of code :
    @hide();
    setGeometry( ... );
    show();
    @

    But this also destroys the OpenGL context and that something I don't want.

    Does anyone know how to correctly resize a QQuickView or a QWindow?

    Solution:

    I discovered that when I maximize the window using system windowmanager, resize doesn't work afterwards. But after if I resize after showMaximized() it works. So my code looks like this :

    @showMaximized()
    setGeometry( .. )@

    1 Reply Last reply
    0
    • B Offline
      B Offline
      beemaster
      wrote on last edited by
      #2

      Have you tried "updateGeometry":http://doc.qt.digia.com/qt/qwidget.html#updateGeometry ?

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        Zamx
        wrote on last edited by
        #3

        Yes, both resize and setGeometry have no effect.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          beemaster
          wrote on last edited by
          #4

          Sorry, I edited my post. Please read it again.

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            Zamx
            wrote on last edited by
            #5

            [quote author="beemaster" date="1351507667"]Have you tried "updateGeometry":http://doc.qt.digia.com/qt/qwidget.html#updateGeometry ?[/quote]

            Thanks for the tip, QWindow doesn't have updateGeometry().

            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