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. QML Drag Outside of Window
Forum Updated to NodeBB v4.3 + New Features

QML Drag Outside of Window

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

    I have a simple rectangle that drags on the x axis. My window size is 800x480.

    I have a white Rectangle that is able to drag on the X axis. When pressed (onPressed) the Rectangle changes to red and drags along the X axis. If the mouse goes outside the window my onReleased signal does not fire nor does the drag ever resume when the mouse enters the window again, Thus the rectangle is still Red.

    Is there any way that I can pickup if the mouse leaves the window?

    Thank you

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alizadeh91
      wrote on last edited by
      #2

      I have a exact situation with QtQuick2. are u using this version?

      1 Reply Last reply
      0
      • R Offline
        R Offline
        runslow
        wrote on last edited by
        #3

        Yup

        1 Reply Last reply
        0
        • A Offline
          A Offline
          alizadeh91
          wrote on last edited by
          #4

          And did u embed qwindow into qwidget?

          1 Reply Last reply
          0
          • R Offline
            R Offline
            runslow
            wrote on last edited by
            #5

            I am just using QtQuick2ApplicationViewer. My app only has one window.

            One way to get around this would be to implement your own cursor exit signal. I was thinking that I could use QCursor::pos and see when the cursor goes outside the window. QCursor::pos returns the global screen coordinates though.

            I haven't tested it yet, but will update once I do.

            Let me know if you have any ideas.

            Thanks

            1 Reply Last reply
            0
            • A Offline
              A Offline
              alizadeh91
              wrote on last edited by
              #6

              I've used qtquick2.0 and embed it in QWidget and i had the same bug as yours. I've tried so much and even opened a page in QtBugReport. Now my problem is resolved in Qt 5.1.0 (I've cloned it from git). As i know the time of next major release is close, but if you haven't that time you can get the latest stable Qt5 from git.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                runslow
                wrote on last edited by
                #7

                Just cloned it.

                Thanks a lot

                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