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@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
--
*Nicolas Krieger*
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest