Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QUndoView doesn't show text
QUndoCommand::setText()to set the text of my undo command. However, while my
QUndoViewdisplays the items it doesn't show the text - it's simply a blank text in the list. Clicking an item in the
QUndoViewproperly performs the undo command but the text is never shown.
I tried many things: Using the
setText()method in the
redo()functions, using it in the constructor as well as passing the text directly to the base class constructor - nothing helped!
Is there any magic to this? I did refer to the undo framework example but I couldn't find anything special - I'm doing exactly the same things. The documentation doesn't seem to mention anything special either.
Do you have several QUndoStacks ?
No Sir, just one. And I use
QUndoView::setStack()to set it.
As mentioned the stack itself works: I can click on items in the stack view and the undo/redo actions are applied accordingly. Just missing the texts.
Which version of Qt are you using ?
A Former User last edited by
Does the example work for you?
Using Qt 5.8.0 with MinGW 5.4.0 32-Bit.
The example works well using exactly the same Qt version and compiler.
Interesting, a clean build later it works fine. That's unexpected.
Still silly of me not to try that first - my bad. Sorry guys! Thanks for your help though, much appreciated!