wow,thanks a lot Dave.I just wanted to try out Qt designer so I read
about PyQt and just installed it.
It is great,I just made a ui that took me in the past 3 days,in 1
hour.But I wasn´t sure about what PyQt exactly was.
Now I understand better.
I am having now some problems querying the values of the QlineEdit
widget.I just made a window with a QlineEdit:
<<
from PyQt4 import QtGui
from PyQt4.QtGui import *
myWindow=loadUI (uiFile ='C:/Users/rudi/Desktop/t/test.ui')
showWindow(myWindow)
>>
I have named in Qt designer the QLineEdit as txtFld_myLine
Now I don´t know how to get the string that the user writes
there.Maybe I am looking at the wrong documentation.
Does it have something to do with QtGui.QInputDialog.getText? because
I tryed something like that without success
<<
myText = QLineEdit("txtFld_myLine")
myName= QtGui.QInputDialog.getText()
>>
Beginings are allways hard,I started building UI in Tkinter,then
changed to do it directly with maya´s python,and now with PyQt,so I am
having some
troubles.
R
On 10 ago, 16:13, David Moulder <[email protected]> wrote:
> Maya's GUI is mostly built with Mel. Mel intern is communicating with the
> the Mel engine and thus the core API and then building QWidgets. Changing
> the GUI to use Qt has given the Maya developers a single API to develop
> cross platform. To build a Qt application in Maya you don't need to install
> PyQt. Maya is a Qt app and so any window you build in maya is a QWidget.
> The mel scripting engine is providing you the ability to make Qt Widgets
> natively without installing PyQt. Thus Maya does not have to buy a licence
> from riverbank to ship PyQt with the product.
>
> This just means the fashion you build UI's inside of maya will be Maya
> centric (mel), and you use the Maya exposed methods to do it. And thus you
> are bound by Maya's exposed method to communicate with Qt, example QTab
> widget via the mel command `dockControl`.
>
> Advantages of ;- to coin a better phrase "MelQt"
>
> No 3rd party library to install
> Native interaction with Maya therefore in theory guaranteed to work
>
> Disadvantages :-
> Bound by MelQt implementation of Qt
> Difficult to make larger applications with this exposed framework
> Not object oriented
> Not learning the Qt API only MelQt
>
> Installing PyQt lets you communicate with Maya's QApplication via PyQt's
> API. PyQt is almost a 1 to 1 mapping of the C++ API via sip. If your
> unsure if you need PyQt then I reckon you don't. Using MelQt via cmds, mel
> or pymel would most likely be enough. In which case, you are only
> installing PyQt or even Qt to get the Designer application. Then loading
> the ui files with what ever it is that Maya provides. Forgot the mel
> command ... Err loadUI is it?
>
> Ran out of steam towards the end, but I hope that helps.
>
> -Dave
>
>
>
> On Tue, Aug 10, 2010 at 2:22 PM, rudi <[email protected]> wrote:
> > solved...it turned out that it had to be wrote in mel.so -command ,not
> > command=.And then "polyCube()" as the string
> > I though that launching the ui using python would require to wite
> > command =...but it doesn´t,I don´t know why.
>
> > On 10 ago, 00:15, rudi <[email protected]> wrote:
> > > Hi,
>
> > > I just started to learning Qt.I tryed to do the same as shown in the
> > > GDC maya 2011 demo,(http://area.autodesk.com/blogs/stevenr/
> > > maya_2011_highlight_qt_user_interface),but with pymel instead of mel.
> > > I don´t understand how the create dynamic property works.For
> > > example,what should I write in the property name, if I just want to
> > > create a polyCube when the button is pushed?
> > > I though that I just had to create a string dynamic property,and
> > > then,in the property name write polyCube()...but nothing happens when
> > > I push the button.
>
> > > R,
>
> > --
> >http://groups.google.com/group/python_inside_maya
>
> --
> David Moulderhttp://www.google.com/profiles/squish3d
--
http://groups.google.com/group/python_inside_maya