Results 1 to 3 of 3

Thread: Connect QPushbutton and QListWidget-Scrollbar

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2015
    Qt products
    Unix/X11 Windows Android

    Question Connect QPushbutton and QListWidget-Scrollbar

    I'm looking for a Way to connect the Scrollbar of a QListWidget with a QPushbutton. So that I can use two QPushbuttons to scroll up and down. I only find the scrollToTop() and scrollToBottom() functions, but they scroll all the way and I only want them to scroll a Step, like the small Buttons on the Scrollbar.

    Thanks in advance!

  2. #2
    Join Date
    Feb 2012
    Warsaw, Poland
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4 Qt5
    Unix/X11 Windows Android

    Default Re: Connect QPushbutton and QListWidget-Scrollbar

    You need to calculate which item should be visible and use QAbstractItemView::scrollTo()

Similar Threads

  1. QListWidget in QtableView with scrollbar
    By jwill222 in forum Qt Programming
    Replies: 3
    Last Post: 12th May 2015, 02:25
  2. QListWidget scrollbar position
    By papillon in forum Qt Programming
    Replies: 1
    Last Post: 8th September 2011, 23:44
  3. connect a qpushbutton a slot
    By Lycus HackerEmo in forum Newbie
    Replies: 13
    Last Post: 29th March 2010, 09:14
  4. QListWidget Scrollbar
    By WeeMan in forum Qt Programming
    Replies: 6
    Last Post: 18th March 2010, 23:15
  5. QListWidget + setWindowFlags = bad scrollbar
    By trallallero in forum Qt Programming
    Replies: 5
    Last Post: 9th December 2009, 11:06

Tags for this Thread


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.