Add EditControl support for wxTreeCtrl under wxQT
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
#define _WX_TREEITEM_FACTORY_H_
|
||||
|
||||
#include <QtWidgets/QItemEditorFactory>
|
||||
#include <QtWidgets/QTreeWidget>
|
||||
#include <QtWidgets/QItemDelegate>
|
||||
|
||||
#include "wx/recguard.h"
|
||||
#include "wx/textctrl.h"
|
||||
@@ -71,6 +73,12 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void AttachTo(QTreeWidget *tree)
|
||||
{
|
||||
QItemDelegate *qItemDelegate = static_cast<QItemDelegate*>(tree->itemDelegate());
|
||||
qItemDelegate->setItemEditorFactory(this);
|
||||
}
|
||||
|
||||
QWidget* createEditor(int WXUNUSED(userType), QWidget* parent) const wxOVERRIDE
|
||||
{
|
||||
m_textCtrl = new wxQtListTextCtrl(m_parent, parent);
|
||||
|
Reference in New Issue
Block a user