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. How to get int value from QPoint angleDelta() ?
Qt 6.11 is out! See what's new in the release blog

How to get int value from QPoint angleDelta() ?

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

    hi, I'm trying to use this
    "http://qt-project.org/doc/qt-5.0/qtgui/qwheelevent.html#angleDelta":http://qt-project.org/doc/qt-5.0/qtgui/qwheelevent.html#angleDelta
    to increment a value by using the scroll wheel. But I can't get the int value from the QPoint angleDelta()

    @ void GLWidget::zoomWheel( QWheelEvent *e )
    {
    QPoint scrollStep = e->angleDelta()/120; //I read it's given in multiples of 120
    //int zoomStep = (int)scrollStep;
    setxFrom(xfrom+zoomStep);
    setyFrom(yfrom+zoomStep);
    setzFrom(zfrom+zoomStep);
    } @

    what's the best way to do this? Thanks

    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