Results 1 to 1 of 1

Thread: QSlider sliderReleased() called when moved

  1. #1
    Join Date
    Feb 2006
    Location
    US
    Posts
    173
    Thanks
    16
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: QSlider sliderReleased() called when moved

    Hello,

    Is the signal sliderReleased() supposed to be called when the slider is moved?

    I'm handling the sliderPressed(), valueChanged(), and sliderReleased() signals.

    As you'll note in the sequence below, the sliderReleased() signal is emitted after the first valueChanged() signal. What might be causing this?

    Qt Code:
    1. FormatShapeDockWidget::on_mDensity0Slider_sliderPressed() called!
    2. mDensity0Slider->isSliderDown() true
    3. FormatShapeDockWidget::on_mDensity0Slider_valueChanged() called!
    4. mDensity0Slider->isSliderDown() true
    5. FormatShapeDockWidget::on_mDensity0Slider_sliderReleased() called
    6. mDensity0Slider->isSliderDown() false
    7. FormatShapeDockWidget::on_mDensity0Slider_valueChanged() called!
    8. mDensity0Slider->isSliderDown() false
    9. FormatShapeDockWidget::on_mDensity0Slider_valueChanged() called!
    10. mDensity0Slider->isSliderDown() false
    11. FormatShapeDockWidget::on_mDensity0Slider_valueChanged() called!
    To copy to clipboard, switch view to plain text mode 

    Thanks,
    Ben


    Added after 18 minutes:


    My guess is that something is causing it to lose focus.


    Added after 50 minutes:


    Ugh ... feel stupid now. That was it.
    The focus was changing due to widget setVisible() calls that were being made as the slider value was changing.
    Last edited by brcain; 6th March 2015 at 19:21.

Similar Threads

  1. moved to different forum
    By budda in forum Qt Programming
    Replies: 0
    Last Post: 16th August 2012, 17:40
  2. Replies: 4
    Last Post: 1st December 2011, 20:53
  3. QSlider and sliderReleased() signal
    By Luc4 in forum Qt Programming
    Replies: 1
    Last Post: 19th June 2010, 19:37
  4. Restricting a widget from being moved
    By ArmanS in forum Qt Programming
    Replies: 3
    Last Post: 14th April 2009, 16:48
  5. What if QT tree is moved?
    By QPlace in forum Installation and Deployment
    Replies: 2
    Last Post: 3rd November 2008, 21:43

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.