Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Static Qt build with multiple QPA plugins

Static Qt build with multiple QPA plugins

Scheduled Pinned Locked Moved Solved Installation and Deployment
5 Posts 3 Posters 1.1k Views
  • 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.
  • A Offline
    A Offline
    AnatoliyS
    wrote on 17 Jul 2019, 15:54 last edited by
    #1

    Goal
    We need to have a static build of Qt to be able to deploy it on our machines easily. This build will be used by two services (two separate deployments), one of them will use qminimal, another will use qxcb QPA plugins.

    We would like to have just one build, and then each service will use the plugin that it needs. For example, we could use --platform to select QPA plugin.

    Problem
    We are using these configuration flags for our build:

    -static
    -qpa xcb
    

    or

    -static
    -qpa minimal
    

    This works for just one plugin, but we don't know how to combine plugins in one build.

    Questions

    1. Is it possible to build multiple plugins statically? Like:
    -static
    -qpa minimal xcb
    
    1. Is it is possible, how two services should be configured to use corresponding plugin? Can we use --platform flag for this?
    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 18 Jul 2019, 06:11 last edited by
      #2

      Hi and welcome to devnet,

      The -qpa parameter is either one value or a semi-colon separated list to prioritise which backend to use.

      If you call /path/to/Qt_src/configure --help you'll have a list of available backend that you can enable in your build under "Platform backends".

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

      A 1 Reply Last reply 19 Jul 2019, 08:38
      3
      • A Offline
        A Offline
        AnatoliyS
        wrote on 18 Jul 2019, 10:46 last edited by
        #3

        We resolved this by following configuration:

        Build with this: -qpa minimal;xcb

        And then at runtime we can select plugin in two ways:

        1. Add --platform xcb or --platform minimal as cmd line params to Qt application

        or
        2) By setting env variable export QT_QPA_PLATFORM='xcb'

        P 1 Reply Last reply 18 Jul 2019, 12:23
        0
        • A AnatoliyS
          18 Jul 2019, 10:46

          We resolved this by following configuration:

          Build with this: -qpa minimal;xcb

          And then at runtime we can select plugin in two ways:

          1. Add --platform xcb or --platform minimal as cmd line params to Qt application

          or
          2) By setting env variable export QT_QPA_PLATFORM='xcb'

          P Offline
          P Offline
          Pablo J. Rogina
          wrote on 18 Jul 2019, 12:23 last edited by
          #4

          @AnatoliyS glad you found a solution to your issue. Please don't forget to mark your post as such! Thanks.

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • S SGaist
            18 Jul 2019, 06:11

            Hi and welcome to devnet,

            The -qpa parameter is either one value or a semi-colon separated list to prioritise which backend to use.

            If you call /path/to/Qt_src/configure --help you'll have a list of available backend that you can enable in your build under "Platform backends".

            A Offline
            A Offline
            AnatoliyS
            wrote on 19 Jul 2019, 08:38 last edited by
            #5

            @SGaist when we tried to use a list of values, it didn't work for us:

            This application failed to start because it could not find or load the Qt platform plugin "minimal;xcb"
            in "".
            
            Available platform plugins are: minimal, xcb.
            
            1 Reply Last reply
            0

            1/5

            17 Jul 2019, 15:54

            • Login

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