How i can detecte QtableWidget editor opening
-
Hi,
You could subclass QStyledItemDelegate and override editorEvent and send a signal from there when the right event happens
Hope it helps
-
i have subclassed QStyleditemDelegate
but really not works for me
@bool customDelegateCombobox::editorEvent(QEvent* event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index)
{
if(event->type() == QEvent::InputMethod)
qDebug() << "works";
else
return QStyledItemDelegate::editorEvent(event,model,option,index);
}@ -
What are the different events you are getting ? None of these would work for you ?
-
If I have read the documentation correctly, this function is called when the editing starts, so you would not even need to test the event, just send your signal and call the default implementation.
-
[quote author="SGaist" date="1376776589"]If I have read the documentation correctly, this function is called when the editing starts, so you would not even need to test the event, just send your signal and call the default implementation.[/quote]
Yes the function it called , but i don't want to detect user editing when
he selects the cell , i want to detect when really he start typing -
Please, stop bumping your thread after only a few hours of waiting, the etiquette is to wait at least for 24 to 72 hours.