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. Issues with framelesswindow dragging
Qt 6.11 is out! See what's new in the release blog

Issues with framelesswindow dragging

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 556 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.
  • A Offline
    A Offline
    adutzu89
    wrote on last edited by
    #1

    I'm trying to implement a custom decorator bar for my application but I ran into a couple of issues.

    I'm developing & testing on Ubuntu 16.04.1, AMD64 using Qt Creator 4.0.3 with Qt 5.7.0.

    First issue: the window is shaking when position is changed
    Second issue: the windows does not touch the top panel unless maximized

    Here is the code to the MouseArea :

    MouseArea {
                        Layout.fillWidth: false
                        Layout.fillHeight: true
                        Layout.preferredWidth: decoratorBar.width - windowControl.width
                        cursorShape: Qt.PointingHandCursor
                        acceptedButtons: Qt.LeftButton
                        property point clickPos
                        onPressed: {
                            clickPos = Qt.point(mouse.x,mouse.y)
                        }
                        onPositionChanged: {
                            var delta = Qt.point(mouse.x - clickPos.x, mouse.y - clickPos.y)
                            applicationWindow.x = applicationWindow.x + delta.x
                            applicationWindow.y = applicationWindow.y + delta.y
                        }
                    }
    

    Any ideeas?
    Thank you.

    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