Detach QTabWidget tab

Discuss anything related to product development
Post Reply
seasoned_geek
Posts: 253
Joined: Thu Jun 11 2020 12:18 pm

Detach QTabWidget tab

Post by seasoned_geek »

All,

I don't know if this is "on the list" or if I'm just blind looking through the documentation.

I would like to be able to detach a tab in a tab widget, not just slide it around inside of the window. If you install and try Featherpad you can see what I mean. Open N text files. Drag one tab off to your desktop. Watch new main window pop up with that as its tab.

https://github.com/tsujan/FeatherPad

Is CopperSpice slated to get detachable tabs (or does it already have them and I am just too blind to find)?
ansel
Posts: 152
Joined: Fri Apr 10 2015 8:23 am

Re: Detach QTabWidget tab

Post by ansel »

There is a way to do this in CopperSpice, using the QDockWidget and QMainWindow classes. However, we have seen some limitations for certain use cases. We just happen to be currently looking at a client project that is doing this. Feel free to investigate these classes, and if you want a working example we should be able to post a demo in a couple of weeks.
Ansel Sermersheim
CopperSpice Cofounder
seasoned_geek
Posts: 253
Joined: Thu Jun 11 2020 12:18 pm

Re: Detach QTabWidget tab

Post by seasoned_geek »

I didn't burn any time going down that path because it won't work properly.

The dock widget concept is that you undock something, drag it somewhere, and it exists in its undocked state.

Detachable tab gets dropped to a desktop, the desktop looks for an application, launches new application instance.

Supporting second use case will bust dock widget for all other use cases.
Post Reply