mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix warnings about QStyleFrameOptionsV4
This commit is contained in:
parent
edc6dad0f7
commit
925747b9d4
@ -117,7 +117,11 @@ bool PdmUiTableViewDelegate::isEditorOpen() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void PdmUiTableViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
#if QT_VERSION_MAJOR > 4
|
||||
QStyleOptionViewItem viewItemOption(option);
|
||||
#else
|
||||
QStyleOptionViewItemV4 viewItemOption(option);
|
||||
#endif
|
||||
|
||||
QVariant fgText = index.data(Qt::ForegroundRole);
|
||||
|
||||
|
@ -164,7 +164,11 @@ private:
|
||||
QRect r = rect();
|
||||
QPalette pal = palette();
|
||||
|
||||
#if QT_VERSION_MAJOR > 4
|
||||
QStyleOptionFrame panel;
|
||||
#else
|
||||
QStyleOptionFrameV2 panel;
|
||||
#endif
|
||||
initStyleOption(&panel);
|
||||
style()->drawPrimitive(QStyle::PE_PanelLineEdit, &panel, &p, this);
|
||||
r = style()->subElementRect(QStyle::SE_LineEditContents, &panel, this);
|
||||
|
Loading…
Reference in New Issue
Block a user