PDA

View Full Version : Remote file list Drop to desktop



patrik08
9th February 2007, 19:06
I have build a remote file list model to a QTreeWidget
now i can drag file from desktop & drop to QTreeWidget ++ upload on PUT Webdav method....

But now how i can drag from QTreeWidget & drop to desktop?
i muss fill a QClipboard ?

here is the method drop upload.....



void WebDav_Main::dropEvent(QDropEvent *event)
{
/* incomming data file upload to server */
if(event && event->mimeData()) {
const QMimeData *data = event->mimeData();
QStringList urlmixed;
urlmixed.clear();
QList<QUrl> urlelist;
if (data->hasUrls()) {
urlelist = data->urls();
for ( int i = 0; i < urlelist.size(); ++i ) {
QUrl gettyurl(urlelist.at(i));
if (gettyurl.isValid()) {
QString shema = gettyurl.scheme();
qDebug() << "### shema " << shema;
if (shema == "file") {
QString localfileupsgo = gettyurl.toLocalFile();
urlmixed.append(localfileupsgo);
}
}
}
SendUpPutList(urlmixed);
return;
}

}
}

wysota
9th February 2007, 21:33
This is a very good question, but unfortunately there is no platform independent solution. The problem is that the drop is handled by the TARGET - in this case by the desktop.

patrik08
9th February 2007, 23:50
This is a very good question, but unfortunately there is no platform independent solution. The problem is that the drop is handled by the TARGET - in this case by the desktop.

Why ... i can open firefox open one url or better a picture and drag to desktop? or folder...
How i can find moore info to drag file only to dir or desktop on window microsofts...
Or QT can not handle desktop... from window?

Mac OS X already have a super Mount disk Webdav Method... [Apple + K]
Linux have a webdav kernel mount.... is inaf...
Only Window dont have a Easy Client to access Apache2 Webdav

only netdrive from Novel exist http://www.acs.uwosh.edu/novell/netdrive.htm and this fake client work 90% on cache and not on remote server ... novel developer from this client have the last update from 2002 .... and new Window Vista Mount remote webdav direct to secret service or CIA .... http://en.wikipedia.org/wiki/Next-Generation_Secure_Computing_Base

Palladium :confused:

wysota
10th February 2007, 00:16
Why ... i can open firefox open one url or better a picture and drag to desktop? or folder...
Because the desktop knows how to handle a http request.


How i can find moore info to drag file only to dir or desktop on window microsofts...
Or QT can not handle desktop... from window?
The problem is with Windows Explorer which is responsible for handling drops on Windows. The problem is that the object you drop doesn't exist on your machine at the time of the drop and you have to do a special mambo-jambo by filling some structures Explorer likes and then feed the data into a temporary file which will then be copied by the Explorer into the proper place. This is very complicated and requires a decent knowledge of WinAPI to implement.


Mac OS X already have a super Mount disk Webdav Method... [Apple + K]
Linux have a webdav kernel mount.... is inaf...
Only Window dont have a Easy Client to access Apache2 Webdav
I think we are talking about completely different things here.