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. TableView header Customized
Forum Updated to NodeBB v4.3 + New Features

TableView header Customized

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 531 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.
  • AbderaoufA Offline
    AbderaoufA Offline
    Abderaouf
    wrote on last edited by
    #1

    Gents;
    I am trying to break the header of my table view. I assigned a title to each column using QStringList and sethorizontalheaderlabels, when using the regular <br> with a given column width, the header doesn't break and only part of it appears in the column's header. Any suggestion, please. Thank's in advance.

    jsulmJ 1 Reply Last reply
    0
    • AbderaoufA Abderaouf

      Gents;
      I am trying to break the header of my table view. I assigned a title to each column using QStringList and sethorizontalheaderlabels, when using the regular <br> with a given column width, the header doesn't break and only part of it appears in the column's header. Any suggestion, please. Thank's in advance.

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Abderaouf Did you try to increase the height of the header?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • AbderaoufA Offline
        AbderaoufA Offline
        Abderaouf
        wrote on last edited by
        #3

        @jsulm Yeah, Actually I am using a setfixedheight (100) which should be enough for 3 lines.

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          There is no html support in the itemViews. You need to use \n

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          2
          • AbderaoufA Offline
            AbderaoufA Offline
            Abderaouf
            wrote on last edited by
            #5

            @Christian-Ehrlicher thank you, that worked, I tried /n before :). I paid more attention now.

            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