dhjdhj
26th July 2010, 18:13
I think I'm missing something fundamental. I have been trying to make existing widgets like QListView, QLineEdit accept drops from external applications. The documentation suggests that one needs to reimplement virtual methods such as DropEvent. I have certainly been able to do this by subclassing QLineEdit to MyLineEdit (for example) with no problem.
However, there are properties such as "acceptDrops" defined for these widgets that would seem to suggest that it is possible to drop items into widgets without having to subclass them, simply adding code to the MainWindow class, for example. However, I have not been able to find any way to do this, I don't see any signals available to which I could connect and so forth.
All the examples I have found do indeed subclass the widget. So what am I missing?
Thanks,
D
However, there are properties such as "acceptDrops" defined for these widgets that would seem to suggest that it is possible to drop items into widgets without having to subclass them, simply adding code to the MainWindow class, for example. However, I have not been able to find any way to do this, I don't see any signals available to which I could connect and so forth.
All the examples I have found do indeed subclass the widget. So what am I missing?
Thanks,
D