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. Resize and move windows fails
Qt 6.11 is out! See what's new in the release blog

Resize and move windows fails

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

    Hi.

    I have a window without a border (Qt::FramelessWindowHint). I have made a resize area (left side of the window) which works if it only moves or resizes the window but fails if I do both!

    The following code examples reside inside a MouseArea onPositionChanged function.

    @//Fails: The window only moves but does not grow or shrink!
    var dx = mouseX - previousPosition.x
    wordListWindow.moveWindowPos(dx, 0)
    wordListWindow.setWidth(windowWithAtStart - dx)@

    @//Fails: The window only moves but does not grow or shrink!
    var dx = mouseX - previousPosition.x
    wordListWindow.setWidth(windowWithAtStart - dx)
    wordListWindow.moveWindowPos(dx, 0)@

    @//Works: Window is moved but I want to do both!
    var dx = mouseX - previousPosition.x
    wordListWindow.moveWindowPos(dx, 0)@

    @//Works: Windows is resized but I want to do both!
    var dx = mouseX - previousPosition.x
    wordListWindow.setWidth(windowWithAtStart - dx)@

    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