diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-05-06 07:42:53 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-05-06 07:42:53 (GMT) |
commit | a0ff96a8fd1cbf1206afd12e0062949fa035f64f (patch) | |
tree | ae00b137f60bbb8160990235a469baa7e92667f5 /tests/auto/declarative/qdeclarativetextedit | |
parent | 385799a8269dfb5b48de9e84e52af780fb400272 (diff) | |
download | Qt-a0ff96a8fd1cbf1206afd12e0062949fa035f64f.zip Qt-a0ff96a8fd1cbf1206afd12e0062949fa035f64f.tar.gz Qt-a0ff96a8fd1cbf1206afd12e0062949fa035f64f.tar.bz2 |
Call QDeclarativeItem::geometryChanged() base implementation
Diffstat (limited to 'tests/auto/declarative/qdeclarativetextedit')
-rw-r--r-- | tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml | 12 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp | 13 |
2 files changed, 24 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml b/tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml new file mode 100644 index 0000000..b39ba5b --- /dev/null +++ b/tests/auto/declarative/qdeclarativetextedit/data/geometrySignals.qml @@ -0,0 +1,12 @@ +import Qt 4.7 + +Item { + width: 400; height: 500; + property int bindingWidth: text.width + property int bindingHeight: text.height + + TextInput { + id: text + anchors.fill: parent + } +} diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index 3307b7c..8cc0e3f 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -84,7 +84,7 @@ private slots: void navigation(); void readOnly(); void sendRequestSoftwareInputPanelEvent(); - + void geometrySignals(); private: void simulateKey(QDeclarativeView *, int key); QDeclarativeView *createView(const QString &filename); @@ -808,6 +808,17 @@ void tst_qdeclarativetextedit::sendRequestSoftwareInputPanelEvent() QApplication::processEvents(); QCOMPARE(ic.softwareInputPanelEventReceived, true); } + +void tst_qdeclarativetextedit::geometrySignals() +{ + QDeclarativeComponent component(&engine, SRCDIR "/data/geometrySignals.qml"); + QObject *o = component.create(); + QVERIFY(o); + QCOMPARE(o->property("bindingWidth").toInt(), 400); + QCOMPARE(o->property("bindingHeight").toInt(), 500); + delete o; +} + QTEST_MAIN(tst_qdeclarativetextedit) #include "tst_qdeclarativetextedit.moc" |