Implement wxSpinCtrl::GetTextValue() for wxQt too

This commit is contained in:
Vadim Zeitlin
2021-04-18 13:05:09 +02:00
parent f2d3589d88
commit e5042a6a53
2 changed files with 7 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ public:
T min, T max, T initial, T inc,
const wxString& name );
virtual wxString GetTextValue() const wxOVERRIDE;
virtual void SetValue(const wxString&) wxOVERRIDE {}
virtual void SetSnapToTicks(bool snap_to_ticks) wxOVERRIDE;

View File

@@ -58,6 +58,12 @@ bool wxSpinCtrlQt< T, Widget >::Create( wxWindow *parent, wxWindowID id,
return QtCreateControl( parent, id, pos, size, style, wxDefaultValidator, name );
}
template< typename T, typename Widget >
wxString wxSpinCtrlQt< T, Widget >::GetTextValue() const
{
return wxQtConvertString(m_qtSpinBox->text());
}
template< typename T, typename Widget >
void wxSpinCtrlQt< T, Widget >::SetValue( T val )
{