Results 1 to 7 of 7

Thread: [Qt4 - QTableWidget] thickness gridlines

  1. #1
    Join Date
    Mar 2008
    Posts
    25
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default [Qt4 - QTableWidget] thickness gridlines

    Hi,

    just a very short question, I don't think that it's possible, but I'll give it a shot here:

    how can I make the lines of the grid of a QTableWidget thicker?

  2. #2
    Join Date
    Jan 2006
    Location
    Boston, MA
    Posts
    40
    Thanks
    1
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: [Qt4 - QTableWidget] thickness gridlines

    Try setGridStyle( Qt::PenStyle style ) with Qt::CustomDashLine using QPainterPathStroker::setWidth( qreal width );

  3. #3
    Join Date
    Mar 2008
    Posts
    25
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Qt4 - QTableWidget] thickness gridlines

    Thanks for your respond, but I've tried to figure out what you mean and how to use it...could you give a small sample (pseudo) code ?

  4. #4

    Default Re: [Qt4 - QTableWidget] thickness gridlines

    Quote Originally Posted by Boy View Post
    Thanks for your respond, but I've tried to figure out what you mean and how to use it...could you give a small sample (pseudo) code ?
    I have the same confusing, could someone help us, thanks very much!

  5. #5
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: [Qt4 - QTableWidget] thickness gridlines

    Refer QTBUG-11907
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  6. #6

    Default Re: [Qt4 - QTableWidget] thickness gridlines

    Quote Originally Posted by Santosh Reddy View Post
    thanks very much, I'll try.

  7. #7

    Default Re: [Qt4 - QTableWidget] thickness gridlines

    Quote Originally Posted by standin000 View Post
    thanks very much, I'll try.
    It seems don't need use delegate, use stylesheet instead.

    QTableView::item {
    border-left: 2px solid white;
    border-top: 2px solid white;
    }
    QTableView{
    border-bottom: 2px solid white;
    border-right: 2px solid white;
    }

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.