Results 1 to 2 of 2

Thread: QScrollBar differentiate between programmatic value changes and user interaction ones

  1. #1
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question QScrollBar differentiate between programmatic value changes and user interaction ones

    I want to differentiate whether a scrollbar changes its value because of my code calls (setValue()) or because of UI interaction (mouse wheel, clicking on the slider, clicking on one of the arrows, clicking on the scrollbar - any of these).

    I couldn't understand from the documentation: which signals I should use for that purpose?

    Thanks for your help,
    Frankie

  2. #2
    Join Date
    Dec 2010
    Location
    Israel
    Posts
    90
    Thanks
    59
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QScrollBar differentiate between programmatic value changes and user interaction

    Here's how I resolved it eventually: as far as I see, the two signals sliderPressed and actionTriggered cover the cases of UI interaction by the user. I just made sure I had a slot connected to these two signals and then performed whatever logic was exclusive to the "user changed UI and not code" case.

Similar Threads

  1. Qwt Plots and User Interaction
    By gulendur in forum Qwt
    Replies: 0
    Last Post: 21st May 2011, 18:49
  2. programmatic way to determine if in a macro
    By shevitz in forum Qt Programming
    Replies: 6
    Last Post: 2nd December 2010, 22:20
  3. QSqlTableModel programmatic changes
    By jtdavidson in forum Newbie
    Replies: 3
    Last Post: 13th July 2010, 04:29
  4. Replies: 1
    Last Post: 5th August 2008, 20:36
  5. entering text through user interaction in QTextEdit
    By sar_van81 in forum Qt Programming
    Replies: 6
    Last Post: 1st December 2006, 23:41

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.