diff --git a/include/wx/qt/checkbox.h b/include/wx/qt/checkbox.h index 6bb328de70..82a28ec14f 100644 --- a/include/wx/qt/checkbox.h +++ b/include/wx/qt/checkbox.h @@ -32,6 +32,9 @@ public: virtual void SetValue(bool value); virtual bool GetValue() const; + virtual void SetLabel(const wxString& label) wxOVERRIDE; + virtual wxString GetLabel() const wxOVERRIDE; + virtual QWidget *GetHandle() const; protected: diff --git a/include/wx/qt/stattext.h b/include/wx/qt/stattext.h index 36f8628aae..513bae3479 100644 --- a/include/wx/qt/stattext.h +++ b/include/wx/qt/stattext.h @@ -30,7 +30,8 @@ public: long style = 0, const wxString &name = wxStaticTextNameStr ); - void SetLabel(const wxString& label); + virtual void SetLabel(const wxString& label) wxOVERRIDE; + virtual wxString GetLabel() const wxOVERRIDE; virtual QWidget *GetHandle() const; diff --git a/src/qt/checkbox.cpp b/src/qt/checkbox.cpp index 48baecf281..c248531f72 100644 --- a/src/qt/checkbox.cpp +++ b/src/qt/checkbox.cpp @@ -130,3 +130,14 @@ QWidget *wxCheckBox::GetHandle() const { return m_qtCheckBox; } + +wxString wxCheckBox::GetLabel() const +{ + return wxQtConvertString( m_qtCheckBox->text() ); +} + +void wxCheckBox::SetLabel(const wxString& label) +{ + m_qtCheckBox->setText( wxQtConvertString(label) ); +} + diff --git a/src/qt/stattext.cpp b/src/qt/stattext.cpp index c60a6fdd36..8e410bfa10 100644 --- a/src/qt/stattext.cpp +++ b/src/qt/stattext.cpp @@ -62,6 +62,11 @@ void wxStaticText::SetLabel(const wxString& label) m_qtLabel->setText( wxQtConvertString( label ) ); } +wxString wxStaticText::GetLabel() const +{ + return wxQtConvertString( m_qtLabel->text() ); +} + QWidget *wxStaticText::GetHandle() const { return m_qtLabel;