how to view different windows at the same time using dock widgets? We are developing a medical image viewer and we need to have the possibility of viewing several images(series) at the same time. We have tried MdiAre but it doesn't work nicely with vtk and I don't like tab widgets.
On Wed, Jul 14, 2010 at 5:22 AM, Mark Summerfield <[email protected]> wrote: > On 2010-07-13, Danny Shevitz wrote: >> Howdy, >> >> I'm a newbie and struggling with developing an MDI app. The basic question >> is this: each of my documents >> >> looks and acts like a dialog. When I create my child class, should I >> subclass QDialog or QWidget? >> >> I am currently using QDialog and add a QDialogButtonBox at the bottom. > This >> doesn't work as expected. >> >> When I click close, the MDI child blanks but doesn't disappear. It is as > if >> the QDialog is closing itself, >> >> but the MDI page still exists fine. If I subclass QWidget, then do I need >> to reimplement all the button functionality? > > QDialog should only be used for dialogs (i.e., top-level windows). Use > QWidget for MDI windows. Or better still use the new MDI classes: > QMdiArea instead of QWorkspace and subclass QMdiSubWindow for the > MDI windows themselves. > > Be aware that MDI has been out of fashion for several years so many > people frown upon its use. The fashionable way to do things is to use a > tab widget (which is utterly useless if you want to see two or more > documents at the same time of course) and dock windows. If you need two > or more windows visible and want to be fashionable then you can either > use SDI (multiple top-level main windows -- which duplicate their menus > and toolbars etc. of course) or use splitters. > > PS When you "close" a QDialog by default it is hidden not deleted. > > -- > 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 > _______________________________________________ > PyQt mailing list [email protected] > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > -- Lic. José M. Rodriguez Bacallao Centro de Biofisica Medica ----------------------------------------------------------------- Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo. Recuerda: El arca de Noe fue construida por aficionados, el titanic por profesionales ----------------------------------------------------------------- _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
