[QGIS-Developer] Problems configuring the statusBar

2022-12-10 Thread afernandez via QGIS-Developer
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: sty

Re: [QGIS-Developer] Problems configuring the statusBar

2022-12-10 Thread Andrea Giudiceandrea via QGIS-Developer
Il 10/12/2022 18:06, afernandez via QGIS-Developer ha scritto: self.iface.mainWindow().statusBar().styleSheet(stilus) produces the error: TypeError: styleSheet(self): too many arguments Hi AF, maybe you need to use setStyleSheet(const QString &styleSheet) to set a style sheet. Best regards.

Re: [QGIS-Developer] Problems configuring the statusBar

2022-12-11 Thread afernandez via QGIS-Developer
Get BlueMail for Desktop afernandez via QGIS-Developer wrote: 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.

Re: [QGIS-Developer] Problems configuring the statusBar

2022-12-11 Thread afernandez via QGIS-Developer
Hello Andrea, Sorry for the delay as it has been a busy Sunday with several commitments. I've been trying to implement your proposed solution using different approaches but still unsucessfully (even after trying different combinations). From several posts, a potential syntax would be something lik

Re: [QGIS-Developer] Problems configuring the statusBar

2022-12-11 Thread Nyall Dawson via QGIS-Developer
On Mon, 12 Dec 2022, 7:06 am afernandez via QGIS-Developer, < qgis-developer@lists.osgeo.org> wrote: > Hello Andrea, > Sorry for the delay as it has been a busy Sunday with several commitments. > I've been trying to implement your proposed solution using different > approaches but still unsucessfu

Re: [QGIS-Developer] Problems configuring the statusBar

2022-12-11 Thread coder via QGIS-Developer
Hello Andrea, Sorry for the delay as it has been a busy Sunday with several commitments. I've been trying to implement your proposed solution using different approaches but still unsucessfully (even after trying different combinations). From several posts, a potential syntax would be something lik

Re: [QGIS-Developer] Problems configuring the statusBar

2022-12-11 Thread afernandez via QGIS-Developer
Hi Nyall, 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. Fro

Re: [QGIS-Developer] Problems configuring the statusBar

2022-12-12 Thread WhereGroup
HiĀ  AF, 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 ha

Re: [QGIS-Developer] Problems configuring the statusBar

2022-12-12 Thread afernandez via QGIS-Developer
Hello Johannes, 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

Re: [QGIS-Developer] Problems configuring the statusBar

2022-12-13 Thread WhereGroup
Hey AF, oh, looks like the help() for those Qt objects is not as comprehensive as I hoped. >>> type(iface.mainWindow().statusBar()) https://doc.qt.io/qt-5/qstatusbar.html -> https://doc.qt.io/qt-5/qstatusbar-members.html -> https://doc.qt.io/qt-5/qwidget.html#styleSheet-prop >>> iface.mainW