Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. desktop vs embbeded when using Qt virtual keyboard
Forum Updated to NodeBB v4.3 + New Features

desktop vs embbeded when using Qt virtual keyboard

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 714 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Circuits
    wrote on last edited by Circuits
    #1

    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?

    sierdzioS 1 Reply Last reply
    0
    • C Circuits

      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?

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @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

      | means OR 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).

      (Z(:^

      C 1 Reply Last reply
      1
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Yes it is. See the scope syntax part for the qmake language chapter in Qt's documentation.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • sierdzioS sierdzio

          @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

          | means OR 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).

          C Offline
          C Offline
          Circuits
          wrote on last edited by Circuits
          #4

          @sierdzio So, what if I were to use the Basic.qml (desktop version) with an embedded application? Wouldn't it just show the keyboard as a popup window? Or would it just not work at all?

          sierdzioS 1 Reply Last reply
          0
          • C Circuits

            @sierdzio So, what if I were to use the Basic.qml (desktop version) with an embedded application? Wouldn't it just show the keyboard as a popup window? Or would it just not work at all?

            sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #5

            @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?

            ¯\(ツ)/¯

            (Z(:^

            1 Reply Last reply
            0
            • R Offline
              R Offline
              RobM
              wrote on last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved