I don't have an answer for the stylesheet issue which seems like an 
interesting formatting problem...however I found a workaround (that I 
haven't tested really) that does not involve stylesheets but keeps the 
existing stylesheet rules intact:

app = QtWidgets.QApplication.instance()
font = QtGui.QFont()
font.setPointSize(16)
app.setFont(font)

On Wednesday, July 26, 2017 at 8:57:56 PM UTC-4, Michael Boon wrote:
>
> Marcus and Justin are much more knowledgeable about stylesheets than I am, 
> but, I suspect you just need to set the stylesheet on the main window 
> instead of the QApplication instance. 
>
> The example on this page sets a color, but I think the same approach 
> should work for you:
>
> http://help.autodesk.com/view/MAYAUL/2016/ENU/?guid=__files_GUID_3F96AF53_A47E_4351_A86A_396E7BFD6665_htm
>
>
> On Thursday, 27 July 2017 04:07:25 UTC+10, oglop wrote:
>>
>> This is supposed to be a workaround, because I enlarged maya ui fonts 
>> with 
>>
>> from Qt import QtGui
>> import maya.cmds as MC
>>
>> styleSheet = '''
>>
>> * {
>>   font: 13px;
>> }
>>
>> QTextEdit,QMenu {
>>     font-family: "Courier New";
>>     font: normal 16px;
>>
>> }
>>
>> '''
>>
>> app = QtGui.QApplication.instance()
>> app.setStyleSheet(styleSheet)
>>
>> # This does not show yellow background color anymore
>> MC.warning('something')
>>
>> Or am I doing something wrong with the stylesheet ? I tried 
>>  :not(QSplitter QLineEdit) to exclude it, but it has no effect ( still 
>> always dark color ) 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/a265f0bb-ff6f-40f0-8e46-ab09e02cdb90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to