[Interest] QTreeWidget displays blank widget

Nicolas Krieger nicolas.krieger at medecom.fr
Fri Aug 10 13:17:45 CEST 2018


I've tried with QFrame, and it does not work either.

I've tried with QStyledItemDelegate and only writing the "paint" method :
void

TestDelegate::paint(QPainter*painter,constQStyleOptionViewItem&option,constQModelIndex&index)const

{

SimpleWidget*pWidget=newSimpleWidget;

pWidget->render(painter);

}


But it is not satisfying.

Thank you for your help

Le 10/08/2018 à 12:47, Tony Rietwyk a écrit :
> Hi Nicolas,
>
> Try using a QFrame for SimpleWidget - you may be able to get rid of 
> widget_2.
>
> I'm surprised that the nested QWidget worked, as QWidget doesn't 
> normally draw a background.
>
> Hope that helps, Tony
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-- 
*Nicolas Krieger*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180810/dbffa93b/attachment.html>


More information about the Interest mailing list