Results 1 to 2 of 2

Thread: aligment of Checkboxes Items within QTableView

  1. #1
    Join Date
    Mar 2011
    Posts
    45
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default aligment of Checkboxes Items within QTableView

    hi,
    for a custom table-model that should contain CheckBoxes within a specific column i
    have implemented the data(..) method to check for the Qt::CheckStateRole.

    The problem is that i see that these are always aligned to the left within the table-cell.
    how do i align these to the center without having to implement my own delegate !?!

    thnx alot.

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

    Default Re: aligment of Checkboxes Items within QTableView

    You can't do that without a custom delegate.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. No checkboxes are displayed in a QTableView
    By NoRulez in forum Qt Programming
    Replies: 1
    Last Post: 15th October 2010, 17:28
  2. Can't change items aligment in QGraphicsLinearLayout
    By T4ng10r in forum Qt Programming
    Replies: 1
    Last Post: 28th December 2009, 10:33
  3. Unsolicited checkboxes in QTableView
    By MattPhillips in forum Qt Programming
    Replies: 2
    Last Post: 19th December 2009, 21:44
  4. QTableView and checkboxes
    By ibergmark in forum Qt Programming
    Replies: 3
    Last Post: 23rd February 2008, 15:20
  5. Checkboxes in menu items
    By markcole in forum Qt Programming
    Replies: 2
    Last Post: 4th June 2007, 15:16

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.