Results 1 to 6 of 6

Thread: QTableView Horizontal Bar depressed, looks ugly.

  1. #1
    Join Date
    Aug 2008
    Posts
    39
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QTableView Horizontal Bar depressed, looks ugly.

    How do I prevent the horizontal bar from depressing all column tabs when I am in row selection, it looks bad.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QTableView Horizontal Bar depressed, looks ugly.

    You can use QTreeView if it suits you.

    Otherwise in table view, get the horizontal header and set its setClickable(false);
    QHeaderView::setClickable
    Hope it helps

  3. #3
    Join Date
    Aug 2008
    Posts
    39
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTableView Horizontal Bar depressed, looks ugly.

    If I do that, then they can't sort...is there an open bug on the look of the QTreeView...? (which is what I was using)

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QTableView Horizontal Bar depressed, looks ugly.

    No, the behaviour is intentional and it could be that it depends on the platform.

  5. #5
    Join Date
    Aug 2008
    Posts
    39
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTableView Horizontal Bar depressed, looks ugly.

    OK, well maybe I can work around it by setting only the items in the first column of the table clickable...

  6. #6
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: QTableView Horizontal Bar depressed, looks ugly.

    Hi,

    You can play the style of the tablewidget. It worked for me.

Similar Threads

  1. QTableView Horizontal Header's Width
    By araglin in forum Newbie
    Replies: 3
    Last Post: 21st December 2008, 08:54
  2. How to set QTableView width to width of horizontal header?
    By martinb0820 in forum Qt Programming
    Replies: 0
    Last Post: 2nd December 2008, 20:51

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.