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. onWheel() not working in Qt 6.5.3
Forum Updated to NodeBB v4.3 + New Features

onWheel() not working in Qt 6.5.3

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 257 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.
  • B Offline
    B Offline
    balakrishnarao.ms
    wrote on last edited by
    #1

    I was implemented my application in Qt5.15.2 and application was working fine.
    When mouse is scrolled over rectangle, onWheel() slot was getting called and am able to do some operations.

    Now my problem is, I have updated my Qt version from Qt 5.15.2 to Qt 6.5.3.
    I have fixed build issue and able to launch my application.
    When mouse is scrolled over rectangle, onWheel() slot was not getting called.
    If I create a new application with rectangle component and scrolled over it, onWheel() slot is getting called and able to print console output.
    Rectangle
    {
    width: 300
    height: 200
    color: "red"
    MouseArea
    {
    anchors.fill: parent
    onClicked:
    {
    console.log("+++++++++++++++onClicked called++++++++++++++++++++++++")
    }
    onWheel:
    {
    console.log("--------------OnWheel called------------------------")
    }
    }
    }
    onClicked() slot is working fine for every click on rectangle.
    But same onWheel() slot is not getting called in my application.

    1 Reply Last reply
    0
    • jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on last edited by
      #2

      The code above works for me with Qt 6.5.3 on macOS using Creator's Qt Quick UI Prototype project (with the addition of import QtQuick).

      Asking a question about code? http://eel.is/iso-c++/testcase/

      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