so.. by looking through some more code examples i found online, i can extrapolate that the MQTUtil class of OpenMayaUI may be able to help me get the QWidget that as serves as layout for my gridLayout. but i im having a hard time understanding the docs for MQTUtil in terms of how QWidgets deal with layouts vs how Maya deals with Layouts..
hopefully i can figure out how to simply place my floatSlider QWidget into the QGridLayout and actually see and use it to produce signals. if i can get that far i'll be happy. any examples of this already having been done in the best or neatest way possible would still be very much appreciated. -thanks! -mark therrell On Nov 7, 11:57 am, mtherrell <[email protected]> wrote: > thanks David.. > > yes, the fullname/fullpathname to the layout is the problem im having > right now. > i am trying to discover what that fullpathname looks like to maya. > > i have tried simply using a fullpathname using the maya UI convention > like: > > "mayaMainWindow|myMainWindow|centralWidget|tabWidget|tab_2|gridLayout" > > which is how the ui hierarchy appears in QTDesigner.. but this does > not work.. maya does not see it like that apparently (or i am > formulating it wrong somehow). > > (also, would be nice if i could discover the name directly via maya > some how like some kind of "widget under mouse fullname" script.. > but cannot find one anywhere.. the closest i can find is > getPanel(underPointer=True) and this does not work because my layout > is not a panel. > cannot get lsUI to work because it does not recognize the qt interface > types like "QGridLayout".) > > do you know anything about pymel 1.0.2? it looks like there is > 'UI.asQtObject()' but i can see no examples as to how it might be used > in my case. > (have not downloaded and installed it yet.. one problem at a time > until i know more about 1.0.2.. > > looks like Nathan Horne knows something about what im trying to do.. > but can find no examples of his that do what im trying to do.. > > thanks for any further insights or help.. > > On Nov 6, 1:48 pm, David Moulder <[email protected]> wrote: > > > hmm, should be possible in 2011. > > > As long as you know the fullName of the parent layout then can you not use > > the setParent() cmd and then add the floatSlider. > > Then get the float slider back as a QObject see the api MQtUtil i think. I > > think pymel has toQObject, not documented tho. > > > I suppose you can then use signal as slots with that QObject. > > > It's an interesting mix as it's all Qt but the implementation in both are > > different. > > > -Dave > > > On Sat, Nov 6, 2010 at 7:04 PM, mtherrell <[email protected]> wrote: > > > i should probably restate the problem and be a bit more clear.. > > > > my goal is to generate a maya float slider using the pymel > > > floatSlider() command, in a subclass of an interface created in qt > > > designer (and then pyuic4.. not using "loadUI"). > > > i want to be able to treat this slider like any other QObject.. > > > placing and attaching it into a QGridLayout in my QT interface, and > > > connecting its signals to > > > functions within my subclass. (whether by signals and slots or by the > > > callback functions of the floatslider() command itself..not sure) > > > > my problem is that i do not know how to get the QObject that > > > represents the maya floatSlider so that i can do all these things to > > > it. > > > the object that is returned by pymel does not seem to allow QObject > > > functions. (not a QObject?) > > > > am i missing something simple? > > > i am very new to qt and pymel.. > > > its likely just newb-ism. > > > just needed a little help. > > > > thanks. > > > > On Nov 5, 5:02 pm, mtherrell <[email protected]> wrote: > > > > i am using pymel 1.0 in maya 2011. > > > > i am using QTDesigner to create my interface base class. > > > > > unfortunately, (and surprisingly) QT does not have a float slider. so > > > > i need to make my float slider in my subclass of my qt interface using > > > > pymel. ( prefer not to make an intslider powers of ten bigger than my > > > > desired float range in order to approximate a float slider in QT.) > > > > > (i am using pyuic4 to emit my interface as a .py then i subclass > > > > that .py) > > > > > 1. are there any examples of creating a floatSlider using pymel, and > > > > then laying it out in an already existing qt layout? > > > > > 2. how do i get the QObject that results from creating a floatSlider > > > > so that I can connect its signals using qt? > > > > > 3. is it better to use qt signals to connect the floatSlider to my > > > > functions or better to use the mel 'dragCommand' conventional callback > > > > system somehow? > > > > > thanks for any help on using pymel floatSlider inside a qt layout.. > > > > > -mark therrell > > > > -- > > >http://groups.google.com/group/python_inside_maya > > > -- > > David Moulderhttp://www.google.com/profiles/squish3d > > -- http://groups.google.com/group/python_inside_maya
