Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTableView::resizeRowsToContents

QTableView::resizeRowsToContents

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    anandvivek
    wrote on last edited by
    #1

    I am using QTableView in my qt application, to show the data. Some times dynamically I want to increase the row height of my QTableView, based on the data size. So I used resizeRowsToContents(). Up to 15000 rows it seems fine, but after that if I call the function, it becoming slow. How to avoid the slowness when I am using the resizeRowsToContents(). Kindly give me some suggestion.

    Thanks in advance
    Vivek Anand

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      The most simple is usually the best: avoid resizing big number of rows.

      Do you really need to have that much data loaded at the same time ? How much are you looking at ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        anandvivek
        wrote on last edited by
        #3

        Hi,
        yes, I want to load the much data and resize too. Is there any option to do that.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          One thing you can do is resize smarter i.e. only resize what is currently visible.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • A Offline
            A Offline
            anandvivek
            wrote on last edited by
            #5

            Hi,
            If I scroll up to see the previous data, then how can I resize the previous data.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              If they have already been shown once then the resize should already have happened if you implemented it.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved