Implement initial try of wxDropTarget.
The drop target needs to use an event filter to capture drag-and-drop events from the window.
This commit is contained in:
parent
0dc1654ab6
commit
323cbdabdb
5 changed files with 211 additions and 19 deletions
|
|
@ -10,6 +10,7 @@
|
|||
#define _WX_QT_WINDOW_H_
|
||||
|
||||
#include <list>
|
||||
#include <QObject>
|
||||
|
||||
class QShortcut;
|
||||
template < class T > class QList;
|
||||
|
|
@ -216,6 +217,16 @@ protected:
|
|||
QWidget *m_qtWindow;
|
||||
|
||||
private:
|
||||
class DnDEventAdapter : public QObject
|
||||
{
|
||||
public:
|
||||
DnDEventAdapter();
|
||||
virtual bool eventFilter(QObject* watched, QEvent* event);
|
||||
void SetDropTarget(wxDropTarget* dropTarget, QWidget* window);
|
||||
private:
|
||||
wxDropTarget *m_dropTarget;
|
||||
};
|
||||
|
||||
void Init();
|
||||
QScrollArea *m_qtContainer;
|
||||
|
||||
|
|
@ -238,6 +249,10 @@ private:
|
|||
bool m_processingShortcut;
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
#if wxUSE_DRAG_AND_DROP
|
||||
DnDEventAdapter dnd_event_adapter;
|
||||
#endif
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS_NO_COPY( wxWindowQt );
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue