[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Interprocess DnD
From:       Wilco Greven <greven () kde ! org>
Date:       2002-10-18 11:15:32
[Download RAW message or body]

On Friday 18 October 2002 11:59, Raffaele Sandrini wrote:
> On Friday 18 October 2002 10:58, Wilco Greven wrote:
> > DnD between two programs is not that different from DnD within a program.
> > What you do is encode the data you want to move between the two
> > applications and put it in a QDragObject on the sender's side. The
> > receiver then gets a QDropEvent when the user drops something on it and
> > has to decide if it can decode the data. For a better explanation you
> > should have a look at the Qt drag & drop documentation.
> >
> > Greetings,
> > Wilco
>
> This means, i have to look at kdesktops code to know how it decodes drops
> and then write my drag part to encode the data correctly?

KDesktop uses the KonqDrag class (see libkonq/konq_drag.h) to handle DnD. One 
of the mimetypes it uses is 'text/uri-list' which is the standard way of 
encoding URL's in a drag object.

A very helpful program which helps you understand how DnD works is Qt's 
dragdrop example. Try to drag an item from kmenuedit or kdesktop to it in 
order to discover what mimetypes it supports.

Greetings,
Wilco


 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic