On Wed, Oct 10, 2007 at 11:45:58AM +0200, Jean-Marc Lasgouttes wrote:
> Pavel Sanda <[EMAIL PROTECTED]> writes:
> 
> >> Also, there may be a version of QComboBox that does that.
> >
> > QComboBox does not seem to have such parallel, moreover it seems
> > that it has not support for horizontal line, which means one
> > of three possibilities:
> > - use string as '---------' (ugly)
> > - use some other font for top entries (havent tried how it works)
> > - forget about ontop feature completely
> >
> > so which one you like :) ?
> 
> Andre'? Is there a way to obtain this feature in Qt?

>From a theoretical point of view there is 

  void QComboBox::setItemDelegate(QAbstractItemDelegate *)

which in turn has

  void paint(QPainter * painter, const QStyleOptionViewItem & option,
    const QModelIndex & index) const;

So you could draw whatever you want if, say index.row() == 5.

>From a practical point of view I never tried it.

Andre'

Reply via email to