Hi,
i want to be able to drag a file onto my QListWidget. Therefore I subclassed it into my QFileListWidget. In the designer I set the following:
[QWidget]
acceptDrops = true
[QAbstactItemView]
dragEnabled = true
dragDropMode = DragDrop
package org.rfs.qttestpackage;
import com.trolltech.qt.gui.*;
public QFileListWidget
(QWidget parent
){ super(parent);
setAcceptDrops(true);
}
System.out.println("DROPPED: " + event.toString());
}
}
package org.rfs.qttestpackage;
import com.trolltech.qt.gui.*;
public class QFileListWidget extends QListWidget{
public QFileListWidget(QWidget parent){
super(parent);
setAcceptDrops(true);
}
protected void dropEvent(QDropEvent event) {
System.out.println("DROPPED: " + event.toString());
}
}
To copy to clipboard, switch view to plain text mode
Now, nothing happens when I drag ANYTHING onto this control. Could you please help with pointing out what I am doing wrong?
thanks
Ronny
Bookmarks