One way of doing this is to check the state of the Symmetry when you first
create the button, and use that value to set your buttons state.
button = QPushButton('Symmetry')
if symmetry_is_on():
button.setChecked(True)
Where “symmetry_is_on()” is a function you’ve made to check the state of
the symmetry.
On 14 September 2014 18:10, <[email protected]> wrote:
> Hey everybody,
>
> I'm somewhat new to QT, & pyside, not to mention coding in general. I've
> been working on a tool window for myself, and have hit a snag - I'm hoping
> someone can point me in the right direction.
>
> There's a few checkable QPushButtons in my dialog that turn on/off some
> settings in the move, select, or rotate tool.
>
> It's working great. However, I'd like the button check states to assume
> the state of the tool option when the window is created.
>
> so for instance, If "Symmetry" is turned ON in the Move tool, then when
> my tool window is created - my button for "Symmetry" is checked.
>
> Thanks!
> Kev
>
> --
> 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/dd6324cf-9045-42f4-8b51-f30a8959cf5a%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
*Marcus Ottosson*
[email protected]
--
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/CAFRtmODy3zJxGgxp8nwqNZgqJDsS2Hfw9CH0sPdEvgfuN4SDtw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.