This error is present in Linux 4.1 too. As a workaround, I am using a timer with 0 timeout, which is triggered after slot handlers return. In the timeout slot I simply delete the item.
void Dialog
::on_allTree_userDoubleClicked( const QString &user,
int level,
hackitemtodelete = user; // class member storing the item to delete
QTimer::singleShot(0,
this,
SLOT(hackdeleteitem
()));
// single shot timer that triggers the delete }
void Dialog::hackdeleteitem( ) {
allTree->removeUser(hackitemtodelete); // item gets deleted
hackitemtodelete = ""; // "pointer" is cleared
}
void Dialog::on_allTree_userDoubleClicked( const QString &user, int level,
hackitemtodelete = user; // class member storing the item to delete
QTimer::singleShot(0, this, SLOT(hackdeleteitem())); // single shot timer that triggers the delete
}
void Dialog::hackdeleteitem( ) {
allTree->removeUser(hackitemtodelete); // item gets deleted
hackitemtodelete = ""; // "pointer" is cleared
}
To copy to clipboard, switch view to plain text mode
Bookmarks