[Development] Suggestion on QML portability

Robin Burchell robin+qt at viroteck.net
Sun Jul 15 23:30:13 CEST 2012


Hi,

Again, looking at MeeGo's components in QtQuick2 world, I notice that
some painful changes required for porting from QML1 to QML2 are in
renaming methods, or rearranging things a bit. From the documentation:

  Property and Method Changes

    ListView's highlightMoveSpeed and highlightResizeSpeed properties
have been renamed to highlightMoveVelocity and
highlightResizeVelocity, respectively.
TextInput and TextEdit's openSoftwareInputPanel() and
closeSoftwareInputPanel() methods have been removed. Use the new
Qt.inputMethod property and call Qt.inputMethod.show()
Qt.inputMethod.hide() to show and hide the virtual keyboard.

As I'm looking at a single codebase here, and in the future, I'd like
to ideally have a single branch which can work with QML1 or QML2, I'm
going to be looking at some pretty horrible hacks to work around these
renames/reshuffles, which leaves me wondering what the actual point of
them is.

Is there really that much pain in having a deprecated
closeSoftwareInputPanel method so I don't have to resort to somehow
preprocessing the QML, for instance?

(and to those people who say that preprocessing as a feature of QML
isn't required, I'd point you to this as being yet another example of
why that's not the case in the real world)

BR,

Robin



More information about the Development mailing list