[Qt-interest] Dragging QDockWidget between multiple windows in Qt4
_h_
hiralsmaillist at gmail.com
Wed Sep 23 10:28:48 CEST 2009
Hi John,
I have modified dock.cpp and now it allows to place dockWidget from
mainWindow1 to mainWindow2(vice versa).
Is this what you were looking?
Thank you.
On Thu, Aug 20, 2009 at 12:00 AM, John Cummings <jcummings2 at users.sf.net>wrote:
> >
> > As such, I have attached a short example demonstrating more fully what I
> > said in my previous email. I believe it will give us a better starting
> > point for discussing solutions. For reference, I am developing with Qt
> 4.4
> > but I did not see anything in Qt 4.5 that addresses this issue.
> >
> > So, has anyone else actually managed to dock a widget in multiple main
> > windows?
> >
>
> I have updated the example with the beginning of a clean drag and drop
> implementation (since I haven't found any better way to do it). As I
> mentioned in my first email, I did start on this before, but this time I'm
> doing it in a smaller scale, which should help.
>
> I have currently only captured the mouse events. However, I decided to send
> the example at this point to highlight some of the difficulties I am having
> with QDockWidget, which I hope someone can help me with:
>
> 0. The mouse event methods are not called because QDockWidget overrides the
> more general event() method. This issue is minor, but didn't bode well.
>
> 1. I cannot determine if a click is within the title area unless I insert a
> custom title bar widget. It appears that those details are hidden within
> QDockWidget's private data.
>
> 2. For testing purposed, I did create a dummy title widget that is a
> QLabel.
> However, it does not have all of the nice buttons the default title bar
> has.
> I would like to subclass it, but it seems that this class is private as
> well.
>
> I'm forging ahead, but these issues make me think that there must be an
> easier
> way. I'm about to subclass QMimeData, which I think is the route I need to
> go
> in this case.
>
> Thank you
> John Cummings
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090923/2396f08e/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dock.cpp
Type: application/octet-stream
Size: 4209 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090923/2396f08e/attachment.obj
More information about the Qt-interest-old
mailing list