Magic!

On Thu, Jan 9, 2014 at 6:13 PM, Kurian O.S <[email protected]> wrote:

> -Another way around this would be to querry the textField under pointer,
> but i dont think that's possible, or?!-
>
> If yopu are using pyqt then Natan got some ideas
> http://nathanhorne.com/?p=298
>
> import sip
> import maya.cmds as cmds
> import maya.OpenMayaUI as apiUI
> from PyQt4 import QtGui, QtCore
>
> def getMayaWindow():
>  'Get the maya main window as a QMainWindow instance'
> ptr = apiUI.MQtUtil.mainWindow()
>  return sip.wrapinstance(long(ptr), QtCore.QObject)
> def getFocusWidget():
> 'Get the currently focused widget'
>  return QtGui.qApp.focusWidget()
>
> def getWidgetAtMouse():
> 'Get the widget under the mouse'
>  currentPos = QtGui.QCursor().pos()
> widget = QtGui.qApp.widgetAt(currentPos)
> return widget
>
>
> On Thu, Jan 9, 2014 at 6:05 PM, Ævar Guðmundsson <
> [email protected]> wrote:
>
>> I'm no expert on the matter but I'd guess there is a dragEnter event and
>> presumably, as long as your drag content is plain text you should be able
>> to query the mimetext from that event as it's open...
>>
>>   Hope that helps, if there are no other suggestions I'll try throwing up
>> a practical case tomorrow, if you don't mind me asking though, since it's a
>> really interesting problem you have, what would you do with the text once
>> you have it queried while it's floating? Display it somewhere if just
>> making sure it's copied to a separate clipboard?
>>
>> --
>> 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/adbee889-b1c1-4be9-8e5a-c72cd31171d1%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> --:: Kurian ::--
>
> --
> 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/CANEMyhOWX3SAGqkni-nQXbFafhtJDnSi%3DN-Y-TDQH_RPWdGaaw%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Where we have strong emotions, we're liable to fool ourselves - Carl Sagan

-- 
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/CADHeb2bgbeP%2B_WXM%2BA1jRQEA31v_FAUJtXrDLgTkkT-jw9gqmA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to