Results 1 to 7 of 7

Thread: QListWidget Scrollbar

  1. #1
    Join Date
    Mar 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default QListWidget Scrollbar

    Is there a way to use the default OS scroll bar while using a style sheet for a QListWidget? I'm also having another problem with auto scrolling. I have auto scroll ticked yet it doesn't do anything. Does anyone know a way to fix both of these problems?

  2. #2
    Join Date
    Mar 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QListWidget Scrollbar

    Bumpppppppp

  3. #3
    Join Date
    Jan 2007
    Posts
    92
    Thanks
    14
    Thanked 1 Time in 1 Post

    Default Re: QListWidget Scrollbar

    You need to find the viewPort() of widget and setAutoScroll() on that.

    also there is another methods if yours items are not visible in the QListwidget:-

    scrollToItem ( const QListWidgetItem * item, QAbstractItemView::ScrollHint hint = EnsureVisible ) [

  4. #4
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: QListWidget Scrollbar

    You may know but useful to say that in order to the scroll bar appears, you need to have adaquate number of items inside the list. Did you check that?

  5. #5
    Join Date
    Mar 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QListWidget Scrollbar

    Quote Originally Posted by user_mail07 View Post
    You need to find the viewPort() of widget and setAutoScroll() on that.

    also there is another methods if yours items are not visible in the QListwidget:-

    scrollToItem ( const QListWidgetItem * item, QAbstractItemView::ScrollHint hint = EnsureVisible ) [
    I tried this before and it does not work.

    @zgulser
    The scroll bar does become visible when there are more than a certain amount of items.

  6. #6
    Join Date
    Mar 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QListWidget Scrollbar

    Bumpppppppp

  7. #7
    Join Date
    Mar 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QListWidget Scrollbar

    Bumpppppppp

Similar Threads

  1. ScrollBar
    By damodharan in forum Qt Programming
    Replies: 1
    Last Post: 11th February 2010, 15:50
  2. QListWidget + setWindowFlags = bad scrollbar
    By trallallero in forum Qt Programming
    Replies: 5
    Last Post: 9th December 2009, 12:06
  3. No ScrollBar in QGraphicsView
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 7
    Last Post: 26th August 2009, 10:11
  4. Scrollbar
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 31st October 2007, 08:33
  5. scrollBar in tabWidgets
    By baray98 in forum Qt Programming
    Replies: 7
    Last Post: 17th September 2007, 19:23

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.