Re: [PyQt] Can DockWidgets be docked onto anything else except MainWindows?

2012-02-03 Thread Phil Thompson
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?

2012-02-02 Thread Chris Kaynor
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?

2012-02-02 Thread Hans-Peter Jansen
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?

2012-02-02 Thread JPolk

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?

2012-02-01 Thread Andreas Pakulat
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?

2012-02-01 Thread JPolk

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