mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
fix deprecated warning QTreeWidgetItem::setBackgroundColor
Use setBackground() instead. This function was introduced in Qt 4.2.
This commit is contained in:
committed by
Laurent Trinques
parent
faf35c4985
commit
74c3fc8dd9
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user