Results 1 to 2 of 2

Thread: Hi,

  1. #1
    Join Date
    Nov 2007
    Posts
    24
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    5

    Default Hi,

    In QTableView with StandardItemModel, is there a simple way to set alignment of an whole column ?


    Thanks...

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

    Default Re: Hi,

    By default the Qt::TextAlignmentRole of each item is honoured. You could set this on the items in your model. Alternatively, you could use a custom delegate to do something different with the painting of items in that column.

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
  •  
Qt is a trademark of The Qt Company.