MCon
4th February 2016, 13:04
I want certain status message to stand-out in status bar.
Best option would be to color-code them (red for errors, blue for warning, gray for debug, ...).
I tried something along the lines:
ui->statusBar->showMessage(QString("<p style=\"color:red\">%1</p>").arg(te->msg));, but it doesn't work because apparently showMessage() does not support rich text.
I know I could use the stylesheet attached to statusBar, but that has two drawbacks:
it would apply to the whole statusBar and not just to the current temporary message.
it would not reset automatically for next message.
What is the right way to tackle this problem?
TiA!
Best option would be to color-code them (red for errors, blue for warning, gray for debug, ...).
I tried something along the lines:
ui->statusBar->showMessage(QString("<p style=\"color:red\">%1</p>").arg(te->msg));, but it doesn't work because apparently showMessage() does not support rich text.
I know I could use the stylesheet attached to statusBar, but that has two drawbacks:
it would apply to the whole statusBar and not just to the current temporary message.
it would not reset automatically for next message.
What is the right way to tackle this problem?
TiA!