repaired it (a bit)
This commit is contained in:
@@ -87,29 +87,28 @@ void XQItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option
|
||||
qDebug() << " index DEAD!";
|
||||
|
||||
XQItem& item = xqItemFromIndex( index );
|
||||
if( item.isValid() )
|
||||
|
||||
|
||||
switch( item.renderStyle() )
|
||||
{
|
||||
case XQItem::HeaderStyle :
|
||||
return drawHeaderStyle( painter, option, index );
|
||||
|
||||
switch( item.renderStyle() )
|
||||
{
|
||||
case XQItem::HeaderStyle :
|
||||
return drawHeaderStyle( painter, option, index );
|
||||
case XQItem::ComboBoxStyle :
|
||||
return drawComboBoxStyle( painter, option, index );
|
||||
|
||||
case XQItem::ComboBoxStyle :
|
||||
return drawComboBoxStyle( painter, option, index );
|
||||
case XQItem::HiddenStyle :
|
||||
return;
|
||||
|
||||
case XQItem::HiddenStyle :
|
||||
return;
|
||||
|
||||
//case XQItem::ProgressBarStyle :
|
||||
// return drawProgressBarStyle( painter, option, index );
|
||||
//case XQItem::ProgressBarStyle :
|
||||
// return drawProgressBarStyle( painter, option, index );
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
} // switch
|
||||
default:
|
||||
break;
|
||||
} // switch
|
||||
|
||||
|
||||
}
|
||||
|
||||
QStyledItemDelegate::paint(painter, option, index);
|
||||
|
||||
@@ -226,7 +225,7 @@ QWidget* XQItemDelegate::createEditor(QWidget* parent, const QStyleOptionViewIte
|
||||
{
|
||||
XQItem& item = xqItemFromIndex(index);
|
||||
XQItem::EditorType edType = item.editorType();
|
||||
if( !item.hasContentNode() || edType == XQItem::NoEditorType )
|
||||
if( edType == XQItem::NoEditorType )
|
||||
{
|
||||
qDebug() << "---- NO Content or NO EditorType";
|
||||
return nullptr;
|
||||
@@ -235,7 +234,7 @@ QWidget* XQItemDelegate::createEditor(QWidget* parent, const QStyleOptionViewIte
|
||||
qDebug() << "---- ed type:" << XQItem::fetchEditorTypeToString( edType ) << ": " << edType;
|
||||
//return QStyledItemDelegate::createEditor( parent, option, index );
|
||||
|
||||
return itemEditorFactory()->createEditor(edType, parent);
|
||||
return itemEditorFactory()->createEditor(edType, parent);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user