[Interest] Bind a value to editText-property of Qt Quick ComboBox fails

Axel Jäger axeljaeger at googlemail.com
Sun Jan 24 22:28:50 CET 2016


Hello,

I want to implement the following behaviour in a QtQuick based application:

 

A combobox in the toolbar shows the current zoom level. Using the drop down
list, the user shall be able to select some pre defined zoom levels like
100%, 200%, „Fit to screen,“ „Whole page“. The user shall also be able to
enter a specific zoom level like „150“ and there is another mechanism, for
example „pinch to zoom“ that changes the current zoom value. The text in the
combobox shall be updated to reflect that custom zoom level.

 

I have some custom Item that draws my page and that has a property „zoom“
that always contains the current zoom level. I can bind a label’s text
property to this property but binding this property to a combobox’s
editText-property fails. While there is no complain from the qml runtime,
the text just does not change. Binding to currentText fails because it is a
read only property.

 

Does anyone has an  idea how to implement my desired behaviour?

 

Best regards,

 

Axel Jäger

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160124/15545bdd/attachment.html>


More information about the Interest mailing list