diff --git a/clients/qt4/qt4client.cpp b/clients/qt4/qt4client.cpp index 62428ee8..11b73fb6 100644 --- a/clients/qt4/qt4client.cpp +++ b/clients/qt4/qt4client.cpp @@ -69,7 +69,8 @@ public: AbstractButton = 10, Slider = 11, ProgressBar = 12, - Unknown = 13, // Unknown type + SpinBox = 13, + Unknown = 14, // Unknown type Action, // QAction descendant CustomTable, // QtTable descendant Missing // Invalid pointer @@ -143,6 +144,8 @@ public: { return static_cast(m_widget); } inline QProgressBar* progressBar() { return static_cast(m_widget); } + inline QSpinBox* spinBox() + { return static_cast(m_widget); } inline QtTable* customTable() { return qobject_cast(m_widget); } inline QAction* action() @@ -301,7 +304,8 @@ String QtWidget::s_types[QtWidget::Unknown] = { "QLineEdit", "QAbstractButton", "QSlider", - "QProgressBar" + "QProgressBar", + "QSpinBox" }; // Connect a sender's signal to a receiver's slot @@ -717,6 +721,9 @@ bool QtWindow::setText(const String& name, const String& text, case QtWidget::Action: w.action()->setText(QtClient::setUtf8(text)); return true; + case QtWidget::SpinBox: + w.spinBox()->setValue(text.toInteger()); + return true; } // Handle some known base classes having a setText() method @@ -1282,6 +1289,9 @@ bool QtWindow::getText(const String& name, String& text, bool richText) case QtWidget::Action: QtClient::getUtf8(text,w.action()->text()); return true; + case QtWidget::SpinBox: + text = w.spinBox()->value(); + return true; default: if (w.inherits(QtWidget::AbstractButton)) { QtClient::getUtf8(text,w.abstractButton()->text());