Adverti horiz upsell
Using QT Designer for MEL Interfaces
Using QT Designer for MEL Interfaces
css_maya, added 2010-05-04 13:15:19 UTC 85,437 views  Rating:
(6 ratings)
Page 1 of 3

When for the first time I saw Maya 2011 and learned about QT I thought that it must be hard. Most of the time companies won't integrate other things in their programs sufficiantly. But, after a week of working with QT, I must say that god bless all those people in Autodesk.
Developing an interface in QT is simple and fast and it works like charm. You need to download QT and install it. After installation, you'll have a program called "Designer". Opening it will give you option to choose from diferent window templates.
001
Now we select "Main window" and hit "Create" button. A new blank window will appear. This window has a menu bar (on top) and status bar (on bottom). Most of the time you don't need these so you can right click and delete them but if you want to have menu bar then you can use it.
In the picture below I gathered almost all the awailable controls that will work with Maya (directly or indirectly).
005
1-push Button (under Buttons group) --------------------Maya command to access------------> button;
2-radio button (under Buttons group) --------------------Maya command to access------------> radioButton;
3-check box(under Buttons group) -----------------------Maya command to access------------> checkBox;
4-combo box (under containers group) ------------------Maya command to access------------> optionMenu;
5-line edit (under input widgets group) -------------------Maya command to access------------> textField;
6-spin box (under input widgets group) ------------------Maya command to access------------> NONE
7-double spine box (under input widgets group)---------Maya command to access------------> NONE
8-dial (under input widgets group) ------------------------Maya command to access------------> NONE
9-list view (under item views model based) --------------Maya command to access------------> textScrollList;
10-horizontal slider (under input widgets) ----------------Maya command to access------------> intSlider;
11-label (under display widgets group) -------------------Maya command to access------------> NONE
12-progress bar (under display widgets group) ----------Maya command to access------------> progressBar;
13-vertical slider (under input widgets) -------------------Maya command to access------------> intSlider;
14-horizontal line (under input widgets) ------------------Maya command to access------------> NONE
15-vertical line (under input widgets) ---------------------Maya command to access------------> NONE
16-group box (under containers group) ------------------Maya command to access------------> NONE
17-tab widget (under container group) -------------------Maya command to access------------> tabLayout
18-main window --------------------------------------------Maya command to access------------> window;

Now, as you can see, we have no command to access spin boxes or dial control so we need to redirect them to somthing else in the UI that is accessible with MEL.