Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, May 2008
QItemDelegate, QTreeView and scrollbars


Message 1 in thread

Hello!

I have a custom delegate that inherits from QItemDelegate. When displayed
into a QTreeView, the delegate renders fine. Except for one thing: if I
reduce the viewing area, there is no scrollbars anymore:

Before resizing:


After resizing with the mouse (no scrollbars):


For information, I reimplement the sizeHint method to override the delegate
height (it works).

I am guessing that I must inform the View that the delegate is *that* pixels
wide, and that the view should scroll to display it. Am I looking at the
right spot?

Thanks!


-- 
 [ signature omitted ] 

Message 2 in thread

Seems that the HTML email got stripped along the way...

Image before:
http://pemessier.hexpresso.org/misc/treeview_delegate_before.png

Image after: http://pemessier.hexpresso.org/misc/treeview_delegate_after.png


P-É


On Thu, May 1, 2008 at 10:52 AM, Pierre-Étienne Messier <
pierre.etienne.messier@xxxxxxxxx> wrote:

> Hello!
>
> I have a custom delegate that inherits from QItemDelegate. When displayed
> into a QTreeView, the delegate renders fine. Except for one thing: if I
> reduce the viewing area, there is no scrollbars anymore:
>
> Before resizing:
>
>
> After resizing with the mouse (no scrollbars):
>
>
> For information, I reimplement the sizeHint method to override the
> delegate height (it works).
>
> I am guessing that I must inform the View that the delegate is *that*pixels wide, and that the view should scroll to display it. Am I looking at
> the right spot?
>
> Thanks!
>
>
> --
> Pierre-Étienne Messier
> Courriel : pierre.etienne.messier@xxxxxxxxx
>