Hey @all,
within my sublacc of QItemDelegate, the QColorDialog returns always 0 when i want to get the result by using:
QColorDialog *pDialog
= qobject_cast<QColorDialog
*>
(editor
);
if(pDialog) {
int resultCode = pDialog->result();
qDebug() << "Result Code : " << resultCode;
}
}
void MyDelegate::setModelData(QWidget *editor, QAbstractItemModel *model,
const QModelIndex &index) const {
QColorDialog *pDialog = qobject_cast<QColorDialog*>(editor);
if(pDialog) {
int resultCode = pDialog->result();
qDebug() << "Result Code : " << resultCode;
}
}
To copy to clipboard, switch view to plain text mode
It doesn't matter if i press "OK" or "Cancel", the result is ever 0.
Hope anybody could help
Best Regards
NoRulez
Bookmarks