Group of docks organised in tabs/larger dock

71 views
Skip to first unread message

Ruben de Groote

unread,
Feb 12, 2014, 3:21:59 PM2/12/14
to pyqt...@googlegroups.com
Hi everyone,

I would like to implement the following. 

I have several files that I would like to analyse, with the option of looking at a few simultaneously. Each analysis requires a group of widgets, organised in some docks. Is there a way to put each group of docks in a separate tab or a separate pyqtgraph dock?



Many thanks!

Ruben

Luke Campagnola

unread,
Feb 12, 2014, 3:28:41 PM2/12/14
to pyqt...@googlegroups.com
On Wed, Feb 12, 2014 at 3:21 PM, Ruben de Groote <rdeg...@gmail.com> wrote:
I have several files that I would like to analyse, with the option of looking at a few simultaneously. Each analysis requires a group of widgets, organised in some docks. Is there a way to put each group of docks in a separate tab or a separate pyqtgraph dock?


Use QTabWidget, with one DockArea inside each tab page.  

Ruben de Groote

unread,
Feb 12, 2014, 3:49:07 PM2/12/14
to pyqt...@googlegroups.com

Alright. Two small follow-up questions

1. Is there a way to prevent the user from moving a dock from one tab to the other?
2. Is there a way to prevent the user from closing (i.e. x-ing out) of a torn-off tab?

Ruben

Luke Campagnola

unread,
Feb 12, 2014, 4:33:41 PM2/12/14
to pyqt...@googlegroups.com
On Wed, Feb 12, 2014 at 3:49 PM, Ruben de Groote <rdeg...@gmail.com> wrote:

Alright. Two small follow-up questions

1. Is there a way to prevent the user from moving a dock from one tab to the other?
2. Is there a way to prevent the user from closing (i.e. x-ing out) of a torn-off tab?

No and No  :)

If you'd like to give this a shot, my recommendation is to give each Dock two new properties: 

    * closable (bool, default=False) sets the window unclosable if the dock is torn out. 
        This would be implemented in DockArea.floatDock()
    * allowedAreas (list or None) contains the DockArea(s) that this Dock may attach to. If None (the default), then any area is allowed.
        This would be implemented in DockDrop.dragMoveEvent().


 
Reply all
Reply to author
Forward
0 new messages