Results 1 to 5 of 5

Thread: Images + QTableview + Delegates

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default Re: Images + QTableview + Delegates

    Thank you very much, but if I had vertical and horizontal headers, the image on (for example) the vertical header is tiny, how can i made to have a background image on the header?
    QHeaderView doesn't have an addPixmap or something similar function. I read that QHeaderView can't be modified with Delegates is it?

    Kind Regards
    NoRulez

  2. #2
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Images + QTableview + Delegates

    Setting delegate for QHeaderView has no effect, so:
    1. You can use Qt::BackgroundRole for setting brush used for background painting
    2. Or, I'm afraid, you have to subclass QHeaderView and reimplement paintEvent(), as it stands in docs.
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  3. #3
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default Re: Images + QTableview + Delegates

    And the paintEvent() must be the same as in your paint() example for example? Is this correct?

    LG NoRulez

Similar Threads

  1. Different delegates to different Columns of QTableView.
    By kaushal_gaurav in forum Qt Programming
    Replies: 4
    Last Post: 6th August 2008, 09:17
  2. import large number of images
    By sriluyarlagadda in forum Qt Programming
    Replies: 5
    Last Post: 15th May 2008, 10:26
  3. QTableView, QSqlQueryModel and delegates
    By estanisgeyer in forum Qt Programming
    Replies: 1
    Last Post: 29th January 2008, 12:04

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.