Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    SizeHint's "option" seems to be out of date when handed down to function

    General and Desktop
    2
    2
    2062
    Loading More Posts
    • 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.
    • R
      ronM71 last edited by

      I have a QListView with an AbstractItemDelegate doing the "sizeHint" and "Paint" for my rows.

      My goal:

      Every "mouse-over" row should double in height so that I can draw more on it.

      problem:

      In my paint method: the "option.state & QStyle::State_MouseOver" is always correct and i use it to slightly highlight the row the mouse cursor is on...

      in my SizeHint method however, the "option.state & QStyle::State_MouseOver" is always "off", even if the row is currently under my mouse. This makes it impossible for me to suggest a different height for the row base don that case.

      Is that a Qt bug?

      1 Reply Last reply Reply Quote 0
      • A
        andre last edited by

        There certainly are issues in that area of Qt. I've ran into similar problems before.

        Edit:
        See for instance this "report":http://bugreports.qt.nokia.com/browse/QTBUG-11227.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post