<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 12 Dec 2022, 7:06 am afernandez via QGIS-Developer, <<a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="auto">Hello Andrea,</div><div dir="auto">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 
like:</div><div dir="auto"><font color="#636363">      
  variable1 = 
self.iface.mainWindow().statusBar().styleSheet() </font></div><div dir="auto"><font color="#636363">        
variable1.setstyleSheet("background-color: black;")</font></div><div dir="auto">However, this is not effective and 'variable' is returning 
QStatusBar::item{border: none;}, which I'm unsure how to intepret or how to 
define the variable so that setstyleSheet can be applied.</div><div dir="auto">I also tried a more simplified version (following the suggestion 
at 
<a href="https://stackoverflow.com/questions/23490017/how-to-add-style-via-setstylesheet-without-losing-orignal-style-in-qt" target="_blank" rel="noreferrer">https://stackoverflow.com/questions/23490017/how-to-add-style-via-setstylesheet-without-losing-orignal-style-in-qt</a>):</div><div dir="auto"><font color="#636363">        
setstyleSheet("background-color: black;")</font></div><div dir="auto"><font color="#636363">        
self.iface.mainWindow().statusBar().styleSheet()</font></div><div dir="auto">However, it returns <font color="#ff0000">'setstyleSheet' is not 
defined</font> so it doesn't seem to take setstyleSheet w/o an assignment. 
Do you have any suggestion on how you would proceed?</div></div></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Respectfully, your code has many fundamental issues. I would suggest reading the qt documentation and getting a better grasp on qt and the qt API before attempting to write this script.</div><div dir="auto"><br></div><div dir="auto">Nyall</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="auto">Thanks,</div><div dir="auto">AF</div><div>P.S. My apologies for 
the previous reply (it didn't go as 
anticipated)</div><div><br></div></div></div>_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank" rel="noreferrer">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div></div></div>