Re: [Maya-Python] QTabWidget and current tabs

2017-08-08 Thread Justin Israel
Interesting. One would think that if the signal is firing, that the state
of the QTabWidget should now be accurate. I guess use that approach
as-needed when you see this kind of lag in the state :-)



On Wed, Aug 9, 2017 at 3:55 PM Todd Widup  wrote:

> ah  that works :D
>
> thanks Justin
>
> On Tue, Aug 8, 2017 at 8:45 PM, Justin Israel 
> wrote:
>
>> Are you connecting to QTabWidget.currentChanged() signal to respond and
>> print the currentWidget() value? If so, can you see if it makes a
>> difference if you do your connection like this:
>>
>> tabWidget.currentChanged.connect(self.someSlot,
>> QtCore.Qt.QueuedConnection)
>>
>> Similar threads have reported a lag in the event loop updating things, so
>> I wonder if waiting until the event loop runs before evaluating your slot
>> would make a difference.
>>
>> Justin
>>
>>
>> On Wed, Aug 9, 2017 at 3:36 PM Todd Widup  wrote:
>>
>>> I am using currentWidget to get the current tab, but it doesnt work 100%
>>> correctly for me
>>>
>>> ie : i have 3 tabs, Root, Arm, Leg
>>>
>>> if I select leg, it will print leg.  if I select arm, it will print leg,
>>> and if I select arm again, it will print arm this time.
>>>
>>> very first selection will print correctly, the rest are always 1
>>> selection behind
>>>
>>> --
>>> Todd Widup
>>> Creature TD / Technical Artist
>>> todd.wi...@gmail.com
>>>
>>> --
>>> 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 python_inside_maya+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/python_inside_maya/CABBPk37LW2BfEC%2BYfqE%3DQ2TD18bPDkv%3Dyb3D0663sXgHepJx1Q%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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 python_inside_maya+unsubscr...@googlegroups.com.
>>
> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2DWCDWmwbkRxB9t%3D0yP94yoAxSMwn8zEVXg_J94VJ-Xw%40mail.gmail.com
>> 
>> .
>
>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> Todd Widup
> Creature TD / Technical Artist
> todd.wi...@gmail.com
>
> --
> 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 python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CABBPk37Rph52hsOKiLGKL4R5KZcz6GEo52ujPBMwKHCmnP1FHA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2bKKLhqY9vVHnAVqitAJ%3DxB4K5%2BzotpSQcDXQD1fYOoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] QTabWidget and current tabs

2017-08-08 Thread Justin Israel
Are you connecting to QTabWidget.currentChanged() signal to respond and
print the currentWidget() value? If so, can you see if it makes a
difference if you do your connection like this:

tabWidget.currentChanged.connect(self.someSlot, QtCore.Qt.QueuedConnection)

Similar threads have reported a lag in the event loop updating things, so I
wonder if waiting until the event loop runs before evaluating your slot
would make a difference.

Justin


On Wed, Aug 9, 2017 at 3:36 PM Todd Widup  wrote:

> I am using currentWidget to get the current tab, but it doesnt work 100%
> correctly for me
>
> ie : i have 3 tabs, Root, Arm, Leg
>
> if I select leg, it will print leg.  if I select arm, it will print leg,
> and if I select arm again, it will print arm this time.
>
> very first selection will print correctly, the rest are always 1 selection
> behind
>
> --
> Todd Widup
> Creature TD / Technical Artist
> todd.wi...@gmail.com
>
> --
> 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 python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CABBPk37LW2BfEC%2BYfqE%3DQ2TD18bPDkv%3Dyb3D0663sXgHepJx1Q%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA2DWCDWmwbkRxB9t%3D0yP94yoAxSMwn8zEVXg_J94VJ-Xw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] QTabWidget and current tabs

2017-08-08 Thread Todd Widup
I am using currentWidget to get the current tab, but it doesnt work 100%
correctly for me

ie : i have 3 tabs, Root, Arm, Leg

if I select leg, it will print leg.  if I select arm, it will print leg,
and if I select arm again, it will print arm this time.

very first selection will print correctly, the rest are always 1 selection
behind

-- 
Todd Widup
Creature TD / Technical Artist
todd.wi...@gmail.com

-- 
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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CABBPk37LW2BfEC%2BYfqE%3DQ2TD18bPDkv%3Dyb3D0663sXgHepJx1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.