Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. TableView specialized row height for each row depending on content
Qt 6.12 LTS is out! See what's new in the release blog

TableView specialized row height for each row depending on content

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.1k Views 1 Watching
  • 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I have a tableview with some content in rows. The content in a row is based on a model.
    In some of the rows the text contains "<br/>" and then the text after that becomes "invisible" because it comes out of the row height.

    How can I make the row height bigger or stay the same for each row depending on the content?

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hello,

      did You try:
      @pTableView()->verticalHeader()->setResizeMode( QHeaderView::ResizeToContents )@
      ?

      "QHeaderView::setResizeMode( ... )":http://qt-project.org/doc/qt-4.8/qheaderview.html#setResizeMode

      If this won't help, can You post a short code example?

      best wishes,
      poorBob

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Would this even work in QML?

        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
        • Unsolved