PDA

View Full Version : QT - Control exists but doesn't exist?!


jwvanderbeck
02-13-2012, 03:39 PM
Ok gang i'm pulling my hair out on this one.

I have a QT UI that I created in QT Creator, then brought into Maya with loadUI.

Now once that window is in, I am trying to dynamically add more controls to it. Specifically I want to add attribute controls. I could of course throw them on the base window but that would be ugly. I want to put the dynamic controls inside of some placeholder groups/layouts I created in the QT Creator.

The problem is Maya both can, and can't, find those placeholders.

I have tried it with various layouts and containers. Some flat out don't work, but some oddly can be found if I do a:
control -q -fpn whatever;

It will show the proper full path name. But if I then try to USE that as a parent for the creation of a new control, it will error saying that the object doesn't exist.

If there is a better way to go about this i'd love to hear it. Essentially I have a predesigned QT window with some controls on it, laid out nice and neat with layouts and containers, and then I want to add attribute controls to it, but I dont' know of anyway to add those types of controls in QT Creator so I am trying to add them after the fact.

fezz
02-13-2012, 06:11 PM
Without seeing your UI, it's hard to say, but most likely it's because the builtin loadUI command doesn't give you access to all of Qt's widget types. To get access to all of that, you'll want to load the .ui file with PyQt's uic.loadUiType command (or compile it beforehand). Good explanation of the process here:

http://nathanhorne.com/?p=451

jwvanderbeck
02-13-2012, 06:19 PM
Without seeing your UI, it's hard to say, but most likely it's because the builtin loadUI command doesn't give you access to all of Qt's widget types. To get access to all of that, you'll want to load the .ui file with PyQt's uic.loadUiType command (or compile it beforehand). Good explanation of the process here:

http://nathanhorne.com/?p=451

Unfortunately using pyQT or pySide is not an option, but I was hoping to get by using the built in cmds stuff.

CGTalk Moderation
02-13-2012, 06:19 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.