I tried that too.Yes...lots of references on stylesheets but none on command 
line switch usage with it.
I'll have to try a simple app and see if I can get that to work.
I tried using the same stylesheets I already have for several widgets and no 
joy so there either must be some magic to it.
de Mike W9MDB


      From: Bill Somerville <g4...@classdesign.com>
 To: wsjt-devel@lists.sourceforge.net 
 Sent: Wednesday, August 9, 2017 4:27 PM
 Subject: Re: [wsjt-devel] Skins
   
 On 09/08/2017 21:49, Black Michael via wsjt-devel wrote:
  
   I tried using bringing in a simple stylesheet via the command line switch 
-style but I get no effect on the main window or any of the widgets. 
  So either I have the wrong syntax or something just plain isn't working. I 
expect to  be able to name the widget and set the stylesheet like this from 
what I've read. 
  MainWindow {    font: bold 10pt "Arial";    color : white;    
background-color : grey; } 
  I can't find any examples of using the command line switches like this. 
  de Mike W9MDB   
 Hi Mike, IIRC the -style option selects from predefined styles although I 
can't find the docs on that right now. Also see here: 
http://doc.qt.io/qt-5/qapplication.html#styleSheet-prop and here: 
http://doc.qt.io/qt-5/style-reference.html (lots of reading here) Examples in 
the Qt sources, 
here:http://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/widgets/stylesheet
 and 
here:http://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/widgets/styles 
WSJT-X uses both widget and application stylesheets in a rather ad hoc fashion 
and is not a very stylesheet friendly application but that can be sorted out 
with some changes. I suspect that some widgets will always be styled only by 
the application but making it more friendly to different application 
stylesheets and even user stylesheets is a reasonable project, not trivial 
though. What is needed is the metadata to make good stylesheets possible to 
write, for example grouping widgets of similar type and usage by property 
values. Your style sheet look wrong to me, shouldn't the type selector be 
QMainWindow rather than MainWindow. The way WSJT-X controls fonts will not be 
compatible with trying to set fonts via a stylesheet, this is due to a 
limitation in the way Qt widgets use fonts and stylesheets.
  73
 Bill
 G4WJS.
  ------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! 
http://sdm.link/slashdot_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel


   
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel

Reply via email to