Implement wxNotebook::DeleteAllPages() for wxQt
See https://github.com/wxWidgets/wxWidgets/pull/1191
This commit is contained in:
parent
6b11c372a1
commit
3cb395a5a5
@ -45,6 +45,8 @@ public:
|
||||
int SetSelection(size_t nPage) { return DoSetSelection(nPage, SetSelection_SendEvent); }
|
||||
int ChangeSelection(size_t nPage) { return DoSetSelection(nPage); }
|
||||
|
||||
virtual bool DeleteAllPages() wxOVERRIDE;
|
||||
|
||||
virtual QWidget *GetHandle() const;
|
||||
|
||||
protected:
|
||||
|
@ -169,6 +169,17 @@ wxSize wxNotebook::CalcSizeFromPage(const wxSize& sizePage) const
|
||||
return sizePage;
|
||||
}
|
||||
|
||||
bool wxNotebook::DeleteAllPages()
|
||||
{
|
||||
if ( !wxNotebookBase::DeleteAllPages() )
|
||||
return false;
|
||||
|
||||
m_qtTabWidget->blockSignals(true);
|
||||
m_qtTabWidget->clear();
|
||||
m_qtTabWidget->blockSignals(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
int wxNotebook::DoSetSelection(size_t page, int flags)
|
||||
{
|
||||
wxCHECK_MSG(page < GetPageCount(), wxNOT_FOUND, "invalid notebook index");
|
||||
|
Loading…
Reference in New Issue
Block a user