repaired it (a bit)

This commit is contained in:
2025-08-31 14:38:11 +02:00
parent c6454f3106
commit 952409ab1a
5 changed files with 83 additions and 73 deletions

View File

@@ -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);
}