[Interest] Is there any way to find QML object by id?

Tomasz Siekierda sierdzio at gmail.com
Thu May 22 12:19:44 CEST 2014


On 22 May 2014 12:01, Tony Rietwyk <tony at rightsoft.com.au> wrote:
>
>> > Thats exactly what I would also do if it would be my component, but
>> > unfortunately I don't have an access to TextInput { id: input } which
>> > is inside the ComboBox.
>>
>> But you are able to assign the ID or is it built-in? I don't get the
> problem,
>> although I have not used the ComboBox, so maybe that is the reason. All
>> (most :-P) QML elements derive from QtObject, so you can assign
>> "objectName" easily to them.
>
> Hi Tomasz,
>
> For the specific use case, I think the OP is asking for the QML equivalent
> of QComboBox.lineEdit().

Yes, he explained that to me in a different email already.

> Alexander, do you have another use case in mind?  It might clarify your
> requirement.  (I haven't played with QML yet but I thought all QObject info
> is exposed to javascript and the components anyway - isn't that how the
> linkage is achieved?)

IDs are a very special case, because they are only exposed locally and
are invisible to C++.



More information about the Interest mailing list