Re: [PyQt] Can DockWidgets be docked onto anything else except MainWindows?
On Fri, 3 Feb 2012 01:02:56 +0100, "Hans-Peter Jansen" wrote: > On Thursday 02 February 2012, 08:55:44 Andreas Pakulat wrote: >> On 01.02.12 17:37:53, JPolk wrote: >> > Can DockWidgets be docked onto anything else except MainWindows ? >> > >> > Supposed you have either a layout or a widget that's "mid-page" in >> > a window and want to dock/undock from that layout/widget and not >> > the MainWindow... > > A really, really evil idea creepes up my mind: has somebody tried to > embed a QMainWindow into something else?!? Yes - it's a widget like any other. Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Can DockWidgets be docked onto anything else except MainWindows?
On Thu, Feb 2, 2012 at 4:02 PM, Hans-Peter Jansen wrote: > A really, really evil idea creepes up my mind: has somebody tried to > embed a QMainWindow into something else?!? > This does, in fact, work. We do it here at work - embedding a QMainWindow as a tab in a QTabWidget. In our case, the MainWindow is sometimes kept separate, so it needs a menu and status bar, but others a tab view is easier to use. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Can DockWidgets be docked onto anything else except MainWindows?
On Thursday 02 February 2012, 08:55:44 Andreas Pakulat wrote: > On 01.02.12 17:37:53, JPolk wrote: > > Can DockWidgets be docked onto anything else except MainWindows ? > > > > Supposed you have either a layout or a widget that's "mid-page" in > > a window and want to dock/undock from that layout/widget and not > > the MainWindow... A really, really evil idea creepes up my mind: has somebody tried to embed a QMainWindow into something else?!? > > Doesn't look to be possible,...Can anyone confirm this? > > You can, but that requires writing a layout-manager similar to the > one used in QMainWindow (which is not public API so cannot simply be > used). > > So there's no 'out of the box' way to dock QDockWidgets into normal > QWidgets, but if you put in enough effort you can do that. Start digging into Qt's QMainWindow code. It might be easier, then it appears to be? Converting sane C++ code to Python is pretty straight forward. Pete ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Can DockWidgets be docked onto anything else except MainWindows?
Thanks for your reply, Andreas -- View this message in context: http://python.6.n6.nabble.com/Can-DockWidgets-be-docked-onto-anything-else-except-MainWindows-tp4357906p4359825.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] Can DockWidgets be docked onto anything else except MainWindows?
On 01.02.12 17:37:53, JPolk wrote: > > Can DockWidgets be docked onto anything else except MainWindows ? > > Supposed you have either a layout or a widget that's "mid-page" in a window > and want to dock/undock from that layout/widget and not the MainWindow... > > Doesn't look to be possible,...Can anyone confirm this? You can, but that requires writing a layout-manager similar to the one used in QMainWindow (which is not public API so cannot simply be used). So there's no 'out of the box' way to dock QDockWidgets into normal QWidgets, but if you put in enough effort you can do that. Andreas ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Can DockWidgets be docked onto anything else except MainWindows?
Can DockWidgets be docked onto anything else except MainWindows ? Supposed you have either a layout or a widget that's "mid-page" in a window and want to dock/undock from that layout/widget and not the MainWindow... Doesn't look to be possible,...Can anyone confirm this? Thanks! -- View this message in context: http://python.6.n6.nabble.com/Can-DockWidgets-be-docked-onto-anything-else-except-MainWindows-tp4357906p4357906.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt