Results 1 to 2 of 2

Thread: How to adjust QScrollBar in a QTableView/Model?

  1. #1
    Join Date
    Feb 2008
    Posts
    154
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default How to adjust QScrollBar in a QTableView/Model?

    Hi,
    I am developing a QTableView with a QAbstractTableModel. i know that the model will generate 100,000 row , but those rows are generated when the user scroll down 10 rows each time.
    So, the scrollBar of the view does not take 100,000 row size but it takes the size of the existed rows only.
    How can i make the scroll bar takes the size of 100,000 row,while the view only has 10 rows?
    thank you

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to adjust QScrollBar in a QTableView/Model?

    You can return the full row count from the model but only generate the required data when it is first referenced.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 6
    Last Post: 22nd November 2011, 03:53
  2. One Model, Two Views (QTreeView and QTableView)
    By dgarrett97 in forum Newbie
    Replies: 2
    Last Post: 14th September 2009, 18:10
  3. QTableView in ui with model/delegate
    By tpf80 in forum Qt Programming
    Replies: 7
    Last Post: 6th November 2008, 23:00
  4. QTableView Model Help
    By tntcoda in forum Qt Programming
    Replies: 3
    Last Post: 23rd June 2008, 06:57
  5. QTableView sorting when using a model
    By steg90 in forum Qt Programming
    Replies: 2
    Last Post: 12th June 2008, 13:13

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.