[PyQt] best practices for MDI app

Mark Summerfield list at qtrac.plus.com
Thu Jul 15 17:10:54 BST 2010


On 2010-07-15, Lic. José M. Rodriguez Bacallao wrote:
> as dock widgets can only be placed in a main window, can I make an
> internal main window as central widget of my main application windows
> and then treat dock widgets in the central main window widget as my
> display windows? this central main window doesn't have any central
> widget at all. is this ok?
[snip]

It will probably work but I would consider it to be poor practice.
Personally I'd create a custom QWidget subclass with exactly the desired
behaviour rather than abuse a standard Qt widget:-)

-- 
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
    C++, Python, Qt, PyQt - training and consultancy
        "Advanced Qt Programming" - ISBN 0321635906
            http://www.qtrac.eu/aqpbook.html


More information about the PyQt mailing list