I think setting the items may or may not cause a repaint and that may be why the statuses aren't properly updated (can't be sure though).
I suggest trying to add a call to QWidget's 'real' update() function at the very end and seeing if it helps.
super(MyTreeWidget, utxo_list).update()
or..
QWidget.update(utxo_list)
(If that doesn't work, a potential work-around would be nasty as hell and involve clearing all the items from the list and re-constructing the QTreeWidgetItems fresh (ouch).)
https://github.com/clifordsymack/Electron-Cash/blob/4327900266a40667257478fabbaf078c943c4086/plugins/shuffle/qt.py#L146
I think setting the items may or may not cause a repaint and that may be why the statuses aren't properly updated (can't be sure though).
I suggest trying to add a call to QWidget's 'real' update() function at the very end and seeing if it helps.
super(MyTreeWidget, utxo_list).update()
or..
QWidget.update(utxo_list)
(If that doesn't work, a potential work-around would be nasty as hell and involve clearing all the items from the list and re-constructing the QTreeWidgetItems fresh (ouch).)