Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
how can i react to the keyboard ESC event before closeEditor() when i edit a QTreeWidgetItem...
Try this code:
void YourTreeWidget::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Escape) { // Your code here event->accept(); } else { // default implementation QTreeView::keyPressEvent(event); } }
but the closeEditor() still reacts before keyPressEvent.........