Again, what you decide to subclass depends on what you will do with it. If
it is going to be a tool type pop up, then a QDialog makes a lot of sense.
If it is going to be just a composite widget to be placed into something
else, then a QWidget might make more sense.
You are correct that a QMainWindow provides you with immediate methods for
managing toolbars, menus, and statusbar, along with dock widgets. But you
are still free to add toolbars and statusbars to QDialog or QWidget. It is
just more manual:
d = QtGui.QDialog() # or even QtGui.QWidget()
d.resize(800,600)
layout = QtGui.QVBoxLayout(d)
layout.setMargin(0)
tool = QtGui.QToolBar("MyTools", d)
a = tool.addAction(QtGui.QAction("Foo", d))
layout.addWidget(tool)
layout.addStretch()
d.show()
On Tuesday, December 4, 2012 10:18:02 AM UTC-8, san wrote:
>
> i remember you showed in Custom Channel Box example by getting the
> fullname using sip.unwrapinstance
>
> the modalpanel is a QWidget in maya ! so if Maya window itself is a
> QMainWindow it makes me feel that making a class inherit from QWidget (in a
> template )would make more sense.
>
> if I use QDialog in that case how to implement Menubar or toolbar like we
> can setup with QMainWindow?
>
> as an advantage of QMainWindow (what I also remember from Qt Designer)
> that it has placement of Menubar or status bar at a predefined place ..!!!
>
> I feel like i should dig more into code
>
> On Tue, Dec 4, 2012 at 11:03 PM, Justin Israel
> <[email protected]<javascript:>
> > wrote:
>
>> QWidget
>
>
>
>
> --
> **
>
> [image: San's personal blog] <http://feeds.feedburner.com/SanLuthraBlog>
>
> *
> *
>
>
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe