I am really amazed what huge steps the QGIS development has taken in the last months. The new iconset, the improved Print composer and many more changes to be seen in QGIS 2.0 are really awesome!

Among many other cool improvements there is also this nifty blue task-bar, which I find very appealing. Text says: Save completed: Export to vector file finished

Is it possible to address this bar in python for scripts and plugins (for instance to show a small message after finished computations)? I am asking this question here, because i believe that many QGIS developers also visit this Q&A site.

PS: The bar is only visible in QGIS dev and only for some operations.

1 Answer 1


It sure is:

iface.messageBar().pushMessage("Header","MessageBody", QgsMessageBar.WARNING, 2)

the last arg is a timeout in seconds, if it's not supplied then it will stay until the user closes it.

You can even add you own control to the messagebar:

widget = iface.messageBar().createMessage("Test","Testing")
combo = QComboBox()
iface.messageBar().pushWidget(widget, QgsMessageBar.WARNING)

enter image description here


  • @Nathan i'm using QProgressBar instead of QComboBox. i'm unable to align the progressbar label in the right side, currently its showing in middle of the progressbar with % symbol.
    – venkat
    May 8, 2013 at 4:30
  • @venkat that is the style of the progress bar. Have a look at Qt stylesheets on how to change that, or there might be a label property.
    – Nathan W
    May 8, 2013 at 7:56
  • @Nathan i already raised the question regarding this but i didnt get any answer so far. kindly check this link.there i explained with screenshot and source code. stackoverflow.com/questions/16434215/…
    – venkat
    May 9, 2013 at 4:05
  • @venkat answered over there for you
    – Nathan W
    May 9, 2013 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.