fix deprecated warning QTreeWidgetItem::setBackgroundColor

Use
setBackground()
instead.
This function was introduced in Qt 4.2.
This commit is contained in:
Simon De Backer
2020-06-01 09:47:41 +02:00
committed by Laurent Trinques
parent faf35c4985
commit 74c3fc8dd9

View File

@@ -477,16 +477,15 @@ void LinkSingleElementWidget::linkTriggered()
//which element will be linked when he press the apply button //which element will be linked when he press the apply button
if (m_pending_qtwi) if (m_pending_qtwi)
{ {
QBrush brush(Qt::white, Qt::NoBrush);
for(int i=0 ; i<6 ; i++) for(int i=0 ; i<6 ; i++)
{ {
m_pending_qtwi->setBackground(i,brush); m_pending_qtwi->setBackground(i,QBrush(Qt::white, Qt::NoBrush));
} }
} }
for (int i=0 ; i<6 ; i++) for (int i=0 ; i<6 ; i++)
{ {
m_qtwi_at_context_menu->setBackgroundColor(i, Qt::green); m_qtwi_at_context_menu->setBackground(i,QBrush(Qt::green,Qt::SolidPattern));
} }
m_pending_qtwi = m_qtwi_at_context_menu; m_pending_qtwi = m_qtwi_at_context_menu;
} }