diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-12-15 19:11:40 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:47:58 -0300 |
commit | ce42ea6eebacdc4ae3cef913d03d06dd77bb1516 (patch) | |
tree | 263a78737ae18654c94862154da9d844390dc902 /tests/pysidetest/testview.cpp | |
parent | 22b74854195c888b82b1f246d87e16ea18b2c978 (diff) |
Updated the PySide test related to Python model returning data to C++.
Diffstat (limited to 'tests/pysidetest/testview.cpp')
-rw-r--r-- | tests/pysidetest/testview.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/pysidetest/testview.cpp b/tests/pysidetest/testview.cpp index c7e9c6db4..22ef9ddb1 100644 --- a/tests/pysidetest/testview.cpp +++ b/tests/pysidetest/testview.cpp @@ -2,14 +2,11 @@ #include <QDebug> #include <stdio.h> -QObject* +QVariant TestView::getData() { QModelIndex index; QVariant data = m_model->data(index); - QObject* obj = 0; - if (data.canConvert<QObject*>()) - obj = data.value<QObject*>(); - return obj; + return data; } |