[Solved] Access to object properties in a tab element
-
wrote on 7 May 2015, 21:30 last edited by mrdebug 5 Sept 2015, 17:24
Hi. My situation is
TabView { id: twUser Tab { id: tSurname Text { id: text2 text: 'Hello'
Is there a way to access the text properties of text2 element?
-
wrote on 7 May 2015, 21:47 last edited by
Hi,
inside the QML module all ids are available so you can write
text2.text
to read the value. -
wrote on 8 May 2015, 06:35 last edited by
No, with TabView is different. text2 is unavailable.
Outside TabView I can access only at the tab but not at the objects inside the tab.
I can access to tSurname but I obtain an error when I try to access to text2.
Is there a way? -
wrote on 8 May 2015, 07:00 last edited by
If you are outside TabView you can create a
property alias
pointing to thetext2.text
-
No, with TabView is different. text2 is unavailable.
Outside TabView I can access only at the tab but not at the objects inside the tab.
I can access to tSurname but I obtain an error when I try to access to text2.
Is there a way? -
wrote on 9 May 2015, 17:24 last edited by
Perfect!
1/6