QTable Height and Scroll?

  • QTables only show 5 rows of data by default.

    How can I change the height of table to show more rows?

    If I dynamically add more than 5 rows to the table, I expected a scroll bar to display but it doesn’t. How can I get a scroll bar to appear?

  • I was able to change the table height by setting the pagination property “rowsPerPage” to a number bigger than 5. Now that my table is at the height I want, I still want to the scroll bars to appear if the number of rows is greater than “rowsPerPage”.

    I appreciate QTable has lots of pagination stuff to handle fetching data from a server but QTable should not be so tightly bound to this feature.

  • I found in another post the following css sets the table height and adds the scroll.

    .table-class {
      display: block;
      height: 500px;

    It seems you also have to include the pagination property to get it to work.

    Sadly, the scroll bar scrolls the entire table including the header <sigh>.

Log in to reply