desktop vs embbeded when using Qt virtual keyboard
-
I was reading the basic example for the Qt virtual keyboard it shows the following snipit when describing how the application chooses to use the embedded version or the desktop version:
disable-desktop|android-embedded|!isEmpty(CROSS_COMPILE)|qnx { DEFINES += MAIN_QML=\\\"basic-b2qt.qml\\\" } else { DEFINES += MAIN_QML=\\\"Basic.qml\\\" }
could some explain what's happening in this line:
disable-desktop|android-embedded|!isEmpty(CROSS_COMPILE)|qnx {
is this some kind of if/else statement? If so, what exactly is the condition?
-
@Circuits said in desktop vs embbeded when using Qt virtual keyboard:
if this some kind of if/else statement? If so, then what exactly is the condition here?
Yes. qmake syntax is described in detail here: https://doc.qt.io/qt-5/qmake-language.html#scopes-and-conditions
|
meansOR
in qmake,!
is a negation. So this condition reads:disable-desktop or android-embedded or (is not empty(CROSS_COMPILE)) or qnx
and that branch will be executed is any of the conditions are true (that is: if CONFIG value contains them).
-
Hi,
Yes it is. See the scope syntax part for the qmake language chapter in Qt's documentation.
-
@Circuits said in desktop vs embbeded when using Qt virtual keyboard:
@sierdzio So, what if I were to use the Basic.qml (desktop version) with an embedded application?
I have no idea. I don't know what is in either of these files.
Wouldn't it just show the keyboard as a popup window?
If your window manager supports multiple windows - yes it will likely be a popup. If it does not support multiple windows, it likely won't be a popup ;-)
Or would it just not work at all?
¯\(ツ)/¯