[Interest] QTreeWidget displays blank widget

Nicolas Krieger nicolas.krieger at medecom.fr
Tue Aug 28 15:18:07 CEST 2018


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.krieger at 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 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/20180828/871525d4/attachment.html>


More information about the Interest mailing list