Changing cursor type when focus shifts from QTableView cell
Unsolved
General and Desktop
-
Hi,
In my delegate's setModelData I would like to change the cursor to hourglass and at the end of setModelData back to arrow.
This is what I have now:void WhatFixViewDelegate::setModelData(QWidget* editor, QAbstractItemModel* fixModel, const QModelIndex& index) const { QCursor* hold = new QCursor(); hold->setShape (Qt::WaitCursor); QComboBox* whatComboEditor = editor->findChild<QComboBox*>(); Q_ASSERT(whatComboEditor); if (whatComboEditor) { QString newWhatText; newWhatText = whatComboEditor->currentText (); fixModel->setData (index, newWhatText, Qt::EditRole); fixModel->submit (); FixDb* mFixDb = new FixDb; mFixDb->exec (); } }
How can I set the cursor in this case, when the user clicks outside the box?
Thank you. -
You never delete
hold
normFixDb
. -
Do you mean replace the cursor with a BusyIndicator or just show a widget with that indicator ?
-
Then yes.
-
The Qt documentation.