Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. How to customize/create a Wheel Event?

How to customize/create a Wheel Event?

Scheduled Pinned Locked Moved Unsolved Qt for Python
qt for pythonpython
4 Posts 3 Posters 930 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.
  • S Offline
    S Offline
    SoleyRan
    wrote on last edited by
    #1

    Hi guys!
    I was trying to create a wheel event for my widget in PyQt5. I did it in Qt(C++), but so far I have no idea in PyQt.
    Please help me. Thanks in advance!

    JonBJ 1 Reply Last reply
    0
    • S SoleyRan

      Hi guys!
      I was trying to create a wheel event for my widget in PyQt5. I did it in Qt(C++), but so far I have no idea in PyQt.
      Please help me. Thanks in advance!

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @SoleyRan
      Did you try translating your C++ code to PyQt5?

      S 1 Reply Last reply
      0
      • JonBJ JonB

        @SoleyRan
        Did you try translating your C++ code to PyQt5?

        S Offline
        S Offline
        SoleyRan
        wrote on last edited by
        #3

        @JonB Yes, I tried to translate the C++ code to PyQt5, but it seems the params of QWheelEvent in PyQt5 is not the exactly same as Qt. ( I am not sure...)

        I got these info:
        Qt(C++): QWheelEvent::QWheelEvent(QPointF pos, QPointF globalPos, QPoint pixelDelta, QPoint angleDelta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, bool inverted, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized)
        PyQt5: class QWheelEvent(pos, globalPos, pixelDelta, angleDelta, buttons, modifiers, phase, inverted[, source=Qt.MouseEventNotSynthesized])

        JonBJ 1 Reply Last reply
        0
        • S SoleyRan

          @JonB Yes, I tried to translate the C++ code to PyQt5, but it seems the params of QWheelEvent in PyQt5 is not the exactly same as Qt. ( I am not sure...)

          I got these info:
          Qt(C++): QWheelEvent::QWheelEvent(QPointF pos, QPointF globalPos, QPoint pixelDelta, QPoint angleDelta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, bool inverted, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized)
          PyQt5: class QWheelEvent(pos, globalPos, pixelDelta, angleDelta, buttons, modifiers, phase, inverted[, source=Qt.MouseEventNotSynthesized])

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @SoleyRan
          Trying to read through those two lines not presented in code tags here, seems to me they are the same.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved