Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. [PySide] QStyledItemDelegate sizeHint and paint QStyleOptionViewItem rect size

[PySide] QStyledItemDelegate sizeHint and paint QStyleOptionViewItem rect size

Scheduled Pinned Locked Moved Language Bindings
1 Posts 1 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    blerins
    wrote on last edited by
    #1

    Hello!

    I'm trying to create my own ItemDelegate for a QTableView. I've re-implemented sizeHint() for using resizeRowsToContents() on the table. But I've just realized that I'm getting bigger widths on the QStyleOption.rect on sizeHint() than in paint(), by 1px, so the height calculated for the text on it is often too small, smaller than the one I need.

    Am I missing something?

    Thanks

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved