<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hey AF,</p>
<p>oh, looks like the help() for those Qt objects is not as
comprehensive as I hoped.<br>
</p>
<p>>>> type(iface.mainWindow().statusBar())<br>
<class 'PyQt5.QtWidgets.QStatusBar'></p>
<p><a class="moz-txt-link-freetext" href="https://doc.qt.io/qt-5/qstatusbar.html">https://doc.qt.io/qt-5/qstatusbar.html</a> -><br>
<a class="moz-txt-link-freetext" href="https://doc.qt.io/qt-5/qstatusbar-members.html">https://doc.qt.io/qt-5/qstatusbar-members.html</a> -> <br>
<a class="moz-txt-link-freetext" href="https://doc.qt.io/qt-5/qwidget.html#styleSheet-prop">https://doc.qt.io/qt-5/qwidget.html#styleSheet-prop</a><br>
<br>
>>>
iface.mainWindow().statusBar().setStyleSheet("background-color:red;")</p>
<p>Now my status bar is red.</p>
<p>No idea about fonts...<br>
</p>
<p>Have fun!<br>
Hannes<br>
</p>
<div class="moz-cite-prefix">Am 13.12.22 um 03:40 schrieb
afernandez:<br>
</div>
<blockquote type="cite"
cite="mid:19889cf64e8c2.78811b9895ee3@odyhpc.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<div id="compose-body-wrapper" dir="auto">
<div dir="auto">
<div dir="auto">Hello Johannes,</div>
<div dir="auto">Querying was how I found the method
self.iface.mainWindow().statusBar().styleSheet() along with
many others. I circled back and tried to use 'help' to
figure out what I was missing. However, help for
self.iface.mainWindow().statusBar().styleSheet() only tells
me that styleSheet is a method of the
self.iface.mainWindow.statusBar instance that returns a
string. I also explored another method
self.iface.mainWindow().statusBar().setFont(), which is
supposed to take a QFont, but I still haven't been able to
make it work properly either. </div>
<div dir="auto">The bottom line is that I can add widgets to
the statusBar and style them, but even changing the font
type for the whole statusBar remains elusive. At least this
route allows me to move on with the project while I figure
out all the other details. </div>
<div dir="auto">Thanks,</div>
<div dir="auto">AF</div>
<div><br>
</div>
</div>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Johannes Kröger / GIS-Entwickler/-Berater
---------------------------------------------
Where2B Konferenz 2022
15. Dezember 2022 in Bonn und Online
<a class="moz-txt-link-freetext" href="https://where2b-conference.com/">https://where2b-conference.com/</a>
---------------------------------------------
WhereGroup GmbH
Grevenweg 89
20537 Hamburg
Germany
Tel: +49 (0)228 / 90 90 38 - 36
Fax: +49 (0)228 / 90 90 38 - 11
<a class="moz-txt-link-abbreviated" href="mailto:johannes.kroeger@wheregroup.com">johannes.kroeger@wheregroup.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.wheregroup.com">www.wheregroup.com</a>
Geschäftsführer:
Olaf Knopp, Peter Stamm
Amtsgericht Bonn, HRB 9885
-------------------------------
</pre>
</body>
</html>