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. How do I "pass" or "transfer" mouse events from a QToolButton to a QSlider handle in a popup QWidget?

How do I "pass" or "transfer" mouse events from a QToolButton to a QSlider handle in a popup QWidget?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.6k 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.
  • D Offline
    D Offline
    devlinse
    wrote on last edited by
    #1

    I made a custom widget for use in a custom delegate which is composed of a QLineEdit and a QToolButton. The QToolButton acts much like the button in a combobox but instead of showing a dropdown list it shows a popup QSlider.

    The implementation seems to work now but I want to make it so that when you press the mouse on the QToolButton, you can just drag the mouse to drag the QSlider's handle without releasing the mouse button or having to click on the handle again.

    I've managed to move the cursor somewhere inside the QSlider's handle. I also tried using grabMouse()/releaseMouse() but without success.

    The source code: "Download the source":http://www.mediafire.com/?w0jcpifehr7ibb3
    Created with Qt Creator 2.4.1
    Source code built with Qt 4.8.0 for Desktop MinGW/MSVC2010

    I'm a novice to both c++ and Qt so I may be asking the wrong question . Please don't hesitate to point out lines of code that you think is wrong.

    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