<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi AF,</p>
<p>you can always query objects for their type with type(objectname)
or even access their documentation in an interactive interpreter
session with help(objectname). Then you know what methods and
attributes they expose or which Qt documentation page is matching
whatever object you are handling.</p>
<p>Be aware that pages like <a class="moz-txt-link-freetext" href="https://doc.qt.io/qt-5/qstatusbar.html">https://doc.qt.io/qt-5/qstatusbar.html</a>
only list the "direct" members and that the objects might have
already inherited others. For that you can click the "List of all
members, including inherited members" link.</p>
<p>CaSe matters! Best use an IDE that helps you with autocompletion
and inspection, this helps a lot when learning. For PyCharm all
you need to do is select the python-qgis.bat file as interpreter
and let it scan the Python modules for a while.</p>
<p>When googling for QGIS Python classes, make sure you are reading
up-to-date documentation matching your QGIS version, e. g.
<a class="moz-txt-link-freetext" href="https://qgis.org/pyqgis/3.28/gui/QgisInterface.html">https://qgis.org/pyqgis/3.28/gui/QgisInterface.html</a><br>
</p>
<p>Cheers, Hannes</p>
<div class="moz-cite-prefix">Am 12.12.22 um 01:42 schrieb afernandez
via QGIS-Developer:<br>
</div>
<blockquote type="cite"
cite="mid:896c95e38dcf3.98b97f256a4@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">Hi Nyall,</div>
<div dir="auto">Obviously I'm not an expert in Qt/QGIS (only
been using it for a few weeks) and still have many things to
learn. Most of the code works fine (by staying away from
very complex structures) and styling widgets has been no
problem until now when trying to do anything with the
statusBar. From your comment, I went back to the
PyQGISDeveloperCookbook(v3.22) and snippets like </div>
<div dir="auto"><font color="#636363"> myicon =
QIcon("/home/ubuntu/.local/share/QGIS/QGIS3/profiles/default/python/plugins/app/appicon.png")</font></div>
<div dir="auto"><font color="#636363">
iface.mainWindow().setWindowIcon(myicon)</font></div>
<div dir="auto"><font color="#636363">
iface.mainWindow().setWindowTitle("Tailoring QGIS")</font></div>
<div dir="auto">had worked in the past. One problem has been
to find specific documentation about
iface.mainWindow().statusBar(), let alone examples and those
online (e.g.
<a class="moz-txt-link-freetext" href="https://gis.stackexchange.com/questions/210327/how-to-display-qgis-processing-bar-from-a-plugin">https://gis.stackexchange.com/questions/210327/how-to-display-qgis-processing-bar-from-a-plugin</a>)
kind of suggests that my initial snippet could work. I'll
continue reading the cookbook tomorrow but, in the meantime,
is there any other documentation discussing iface in general
or iface.mainWindow().statusBar() that I should also be
reading? (Note: I also checked
<a class="moz-txt-link-freetext" href="https://doc.qt.io/qt-5/qstatusbar.html">https://doc.qt.io/qt-5/qstatusbar.html</a>)</div>
<div dir="auto">Thanks,</div>
<div dir="auto">AF</div>
<div dir="auto">P.S. Again sorry about the extra messages that
shouldn't have been sent to the thread (hopefully it won't
happen again) </div>
<div><br>
</div>
</div>
<div dir="auto"><br>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
</pre>
</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>