Results 1 to 3 of 3

Thread: qt designer and maya 2011

  1. #1
    Join Date
    Sep 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default qt designer and maya 2011

    Hello, I'm a new user to qt and pyqt.
    It is mainly to design ui to be used in Maya 2011.

    I'm still experimenting with both qt designer and the pyqt.

    But I had a question about list view from the qt designer.
    It might be way ahead, but I was wondering if it can be set up in a way that I can refresh the list item by running a mel or python command inside maya.

    What I need is a listview that update its list elements as I work in maya.
    Now in the designer, I can make a list view, and was thinking about usung a -command flag to start a mel procedure that would update the list elements.

    Also, I've read that there is 2 flag -command, and -dragcommand. I cant seem to find a list of dynamic string attribute that can be use in conjunction with maya. Is there such a list?

    Anyone ever did this? or something similar?

    Ill post my finding as I explore this.

    Thanks

  2. #2
    Join Date
    Sep 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt designer and maya 2011

    I found a good tutorial for what I wanted to do.
    http://www.creativecrash.com/maya/tu...he-qt-designer

    so I was able to update the list inside maya by using a mel proc.
    the important thing is that the listView widget name has to be the same as the widget you call whn using textScrollList
    here's my procs

    Qt Code:
    1. proc listStuff()
    2. {
    3. string $list[]=`ls `;
    4. textScrollList -e -ra listWidget;
    5. for($item in $list)
    6. {
    7. textScrollList -e -a $item listWidget;
    8. }
    9. }
    To copy to clipboard, switch view to plain text mode 
    Qt Code:
    1. proc printThis()
    2. {
    3. print "This\n";
    4. }
    To copy to clipboard, switch view to plain text mode 

    They're in mel, not qt..

    now i've linked these 2 procs to my 2 buttons of my ui.
    They work fine using the -command dynamic attributes.

    I tried using the -command on the listView widget but nothing happened.

    I know with Pyqt you can link signal to slot or python def. Is that possible with the qt designer? I'd like to be able to run a mel proc or python def whn I select an item from the listview? actually i'd like to know all event I could run a mel command or python command.

    I included the ui file in case its needed.

    more later...

    P.S. I'm just testing how qt and mel/pyMel works together at the moment, so my solution are not very elegant at the moment. The link I post is very well done and has lots of explanation.
    Attached Files Attached Files

  3. #3
    Join Date
    Sep 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qt designer and maya 2011

    Here's another tutorial I found:
    http://www.creativecrash.com/tutoria...nterfaces#tabs

    Found the signals & slot editor in qt designer.
    I seem to be able to assign signal to slot inside the qt ui, but was wondering if you could link the signal to string dynamic attribute so I could use the signal to call up mel proc or python def inside maya. The menu doesnt seem to be able to let me...

    I know this can be done in PyQt.

    On the other hand, I've found that you can edit certain qt ui control via mel or python command once you're in maya.

    In the case of a listView(make sure you use item-based), it is accessible via the textScrollEdit command. I can then assign it a command that way. The options available via mel are selectionCommand, doubleClickCommand, deleteCommand, and drag and drop callback.

    You can refer to the list in the link above to see which mel command controls the qt ui. The problem is that not all of the ui option for qt are supported within maya.
    The link says that tabLayout control tabWidget, but I havent been able to at this point. All the other mel command/qt ui combination works.

    more Later...

Similar Threads

  1. Replies: 1
    Last Post: 8th September 2010, 19:31
  2. Linker errors for developing Maya plugin with Qt 4.6
    By dythim in forum Qt Programming
    Replies: 0
    Last Post: 5th May 2010, 20:38
  3. compiling maya (3d application ) with qt
    By knishaq in forum Qt Programming
    Replies: 1
    Last Post: 14th December 2009, 06:28
  4. Maya Style Right Click Menus in Qt
    By dvmorris in forum Qt Programming
    Replies: 1
    Last Post: 13th April 2007, 11:55
  5. Replies: 1
    Last Post: 22nd January 2007, 12:13

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.