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. Problem Qt 4.8 + MAC -> mouse buttons after drag and drog
Forum Updated to NodeBB v4.3 + New Features

Problem Qt 4.8 + MAC -> mouse buttons after drag and drog

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 2 Posters 3.3k Views 2 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.
  • D Offline
    D Offline
    devarde
    wrote on last edited by
    #1

    I am using Qt 4.8 + MAC and when I perform a drag and drop the MAC understands that after the drop the left mouse button is pressed, tough, as matter of fact, it isn't.

    How I can work around this problem?

    Thanks, beforehand.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      What do you mean by "the MAC understands that after the drop the left mouse is pressed" ?

      Also what exact version of Qt 4.8 and OS X are you using ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        devarde
        wrote on last edited by
        #3

        After to finish the drag-and-drop, when I read the mouse state, Qt informs me that the mouse left button is pressed.
        After the drag and drop I need to perform a mouse wheel:

        void MyWidget::doWheel ( QWheelEvent * event )
        {
            if (layerStack)
            {
                layerStack->handleEvent(EventData(event, realWidget));
        
            }
        }
        

        EventData has the following code:

        init(e, e->buttons(), e->modifiers());
        
        void EventData::init(QInputEvent *e, Qt::MouseButtons buttons, Qt::KeyboardModifiers keyboard)
        {
            if (buttons & Qt::LeftButton) {
                modifiers |= MouseEventModifier::Left;
            }
            if (buttons & Qt::RightButton) {
                modifiers |= MouseEventModifier::Right;
            }
            if (buttons & Qt::MidButton) {
                modifiers |= MouseEventModifier::Middle;
            }
            ...
        }
        

        In this moment it recognizes as Qt::LeftButton was active.

        Qt: 4.8.7
        Mac: 10.10.5 (OSX Yosemite)

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Why do you need that scroll event for ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • D Offline
            D Offline
            devarde
            wrote on last edited by
            #5

            With drag and drop I drag a image to the main panel.
            In the main panel a image can be actually a series of images. In this case I advance the images scrolling it. It is the purpose of scrolling. It is an event that can be occur any moment after the drag-and-drop.

            If I click on the panel with any mouse button before to scroll, the scroll works, but this is not desirable (the forced click)

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Why not use scrollTo ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • D Offline
                D Offline
                devarde
                wrote on last edited by
                #7

                After so much Googling I found my answer. The problem is a Qt 4.8.x bug on OSX.
                ACcording the issue tracker this question was solved in Qt 5.x

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Can you share the bug report link ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  D 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    Can you share the bug report link ?

                    D Offline
                    D Offline
                    devarde
                    wrote on last edited by
                    #9

                    @SGaist https://bugreports.qt.io/browse/QTBUG-27634

                    I don't have any option to mark this question as solved. Does it because I didn't created it with a question flag or something like that? If you can, I would be glad if you do that to maybe help other users with the same problem.

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Don't you have that option with the "Topic Tool" button ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        devarde
                        wrote on last edited by
                        #11

                        Sorry. I saw all buttons, except that one hehe.

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          No worries, that happens ;)

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          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