Add missing d'tor

This commit is contained in:
Graham Dawes
2019-02-05 14:17:45 +00:00
parent 9f1f8636c5
commit 2a91c00c10
2 changed files with 8 additions and 0 deletions

View File

@@ -21,6 +21,8 @@ public:
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxTreeCtrlNameStr); const wxString& name = wxTreeCtrlNameStr);
virtual ~wxTreeCtrl();
bool Create(wxWindow *parent, wxWindowID id = wxID_ANY, bool Create(wxWindow *parent, wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, const wxSize& size = wxDefaultSize,

View File

@@ -76,6 +76,12 @@ bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id,
return QtCreateControl(parent, id, pos, size, style, validator, name); return QtCreateControl(parent, id, pos, size, style, validator, name);
} }
wxTreeCtrl::~wxTreeCtrl()
{
if (m_qtTreeWidget != NULL)
m_qtTreeWidget->deleteLater();
}
unsigned wxTreeCtrl::GetCount() const unsigned wxTreeCtrl::GetCount() const
{ {
return m_qtTreeWidget->topLevelItemCount(); return m_qtTreeWidget->topLevelItemCount();