It does not work neither.

But I have finally found the solution; use "setBackgroundRole(QPalette::Window)" in the widget that will be displayed in the TreeWidget. The default value is QPalette::NoRole.

That's all ! There is nothing else to do.

On 8/10/2018 1:41 PM, coroberti . wrote:
Hi,
Try for your widgets to call

setAutoFillBackground(true);


Kind regards,
Robert


On Thu, Aug 9, 2018 at 5:58 PM, Nicolas Krieger
<nicolas.krie...@medecom.fr> wrote:
Hello

I would like to display colored widgets in a QTreeWidget.

Screenshots of what I really have are in attached files.

My wigdet is colored, but when in the QTreeWidget, it is all white. How can
I resolve it?

--
Nicolas Krieger

_______________________________________________
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

Reply via email to