Results 1 to 4 of 4

Thread: QTableWidget - turn off heading separator

  1. #1
    Join Date
    Nov 2008
    Posts
    183
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QTableWidget - turn off heading separator

    All,

    This should be quite simple but it is eluding me at the moment. I want to turn off the heading separator QTableWidget shows when you set the text for column and row headings. The default appears to be 3 little dots. Since I have user resizing disabled I would really like to either turn thise off or change it to be a continuation of the line.

    qt 4.8 on Linux Mint 13

    Application will eventually be built for an embedded target but I'm just tooling around with table stuff now in a stand alone application.

    Thanks,
    Roland

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QTableWidget - turn off heading separator

    The default appearance is dependent on the theme in use.

    There is no simple switch to render the QHeaderView without section borders and last time I checked it did not honour stylesheets either. You could look at what you can achieve the overriding paintSection(), but I suspect that this only has access to the area between the borders that are already painted. Reimplementing all of paintEvent() would be quite a lot of work.

    Depending on your application, e.g. A fixed table, you might want to treat the labels as the first row/column of the data area rather than use the QHeaderView.

  3. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QTableWidget - turn off heading separator

    The default appears to be 3 little dots.
    Are you talking about text eliding and the default 3-dot ellipsis that is inserted? That's not a heading separator. Look at QAbstractItemView::setTextElideMode() and set it to Qt::ElideNone.

  4. #4
    Join Date
    Nov 2008
    Posts
    183
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTableWidget - turn off heading separator

    d_stranz,

    It's not at the end of the text but between each row, instead of a line as is in the data grid. I had tried the ElideNone option and it had no effect. I would have "thought" it to use the grid lines as separators, but I've been warned about thinking before.

    Thanks for the responses though.

Similar Threads

  1. Is it possible to turn off JIT in Qt5 Webkit?
    By pyl0420 in forum Qt Programming
    Replies: 0
    Last Post: 20th November 2013, 14:53
  2. QDockWidget separator
    By ruscoff in forum Qt Programming
    Replies: 2
    Last Post: 23rd October 2013, 08:22
  3. The Heading Diagram In a Well Logging Software
    By ecisp.wangshuo in forum Qwt
    Replies: 2
    Last Post: 20th July 2013, 00:07
  4. How to turn off PC?
    By wydesenej in forum Qt Programming
    Replies: 1
    Last Post: 20th January 2009, 17:56
  5. hide the row heading of Table Widget
    By sabeesh in forum Qt Programming
    Replies: 1
    Last Post: 24th July 2007, 11:31

Tags for this Thread

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.