[QGIS-Developer] Problems configuring the statusBar
afernandez
afernandez at odyhpc.com
Sat Dec 10 09:06:40 PST 2022
Hello,
I'm facing some problems while trying to modify some of the properties of
the statusBar. For example, trying to use the styleSheet method with the
following snippet:
stilus = "background-color: black;"
self.iface.mainWindow().statusBar().styleSheet(stilus)
produces the error:
TypeError: styleSheet(self): too many arguments
It's like if styleSheet didn't take any parameter and I've been unable to
find similar uses online. [Note: Also tried modifying the syntax defining
the style (just in case) but it's always the same error]
Another problem is that I can add a string to the statusBar as in the
following example:
text = "CPU: "+cpu_nomen
self.iface.mainWindow().statusBar().showMessage(text)
This will output the string. However, doing anything of substance (e.g.
opening a plugin) erases the new text and I'm unsure how to make it
permanent.
Thanks,
AF
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20221210/4dd1cc47/attachment.htm>
More information about the QGIS-Developer
mailing list