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. How to utilize Qt plugins when building Qt from source?
Forum Updated to NodeBB v4.3 + New Features

How to utilize Qt plugins when building Qt from source?

Scheduled Pinned Locked Moved Solved Installation and Deployment
5 Posts 2 Posters 706 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.
  • J Offline
    J Offline
    JW16
    wrote on 18 Nov 2022, 21:17 last edited by
    #1

    I have built Qt 5.15 from source (open source version). I have separately checked out the qtstylesplugin from github and built that. How do I use the styles from the plugin with the app I am building using Qt 5.15. Do I need to check out the plugin from within my Qt source and build it there? Do I just need to copy the DLLs I built for the plugin somewhere? Won't I need the source as well?

    Sorry for the basic question, but it's my first time trying to get one of these working and google only turned up instructions on how to create plugins, or using them with Qt Creator, when I tried searching for it

    C 1 Reply Last reply 18 Nov 2022, 21:32
    0
    • J JW16
      18 Nov 2022, 21:17

      I have built Qt 5.15 from source (open source version). I have separately checked out the qtstylesplugin from github and built that. How do I use the styles from the plugin with the app I am building using Qt 5.15. Do I need to check out the plugin from within my Qt source and build it there? Do I just need to copy the DLLs I built for the plugin somewhere? Won't I need the source as well?

      Sorry for the basic question, but it's my first time trying to get one of these working and google only turned up instructions on how to create plugins, or using them with Qt Creator, when I tried searching for it

      C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 18 Nov 2022, 21:32 last edited by
      #2

      @JW16 said in How to utilize Qt plugins when building Qt from source?:

      Do I just need to copy the DLLs I built for the plugin somewhere? Won't I need the source as well?

      You have to compile the plugin with the same Qt version as you're using on your PC and then copy it to the appropriate plugin subdirectory as explained here.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • J Offline
        J Offline
        JW16
        wrote on 22 Nov 2022, 14:46 last edited by
        #3

        @Christian-Ehrlicher said in How to utilize Qt plugins when building Qt from source?:

        You have to compile the plugin with the same Qt version as you're using on your PC and then copy it to the appropriate plugin subdirectory as explained here.

        You mean build it using the same qmake version? Or do you mean the plugin source must be incorporated with the Qt source at the time I build Qt in general?

        I have built the plugins using the same qmake version, and tried placing the DLLs and source dirs for the styles I want in the QTDIR/plugins/styles dir, as well as the styles dir alongside my app executable, and Qt fails to load them (QStyleFactory::create() returns null for the desired styles). Not sure what I am missing here.

        C 1 Reply Last reply 22 Nov 2022, 15:39
        0
        • J JW16
          22 Nov 2022, 14:46

          @Christian-Ehrlicher said in How to utilize Qt plugins when building Qt from source?:

          You have to compile the plugin with the same Qt version as you're using on your PC and then copy it to the appropriate plugin subdirectory as explained here.

          You mean build it using the same qmake version? Or do you mean the plugin source must be incorporated with the Qt source at the time I build Qt in general?

          I have built the plugins using the same qmake version, and tried placing the DLLs and source dirs for the styles I want in the QTDIR/plugins/styles dir, as well as the styles dir alongside my app executable, and Qt fails to load them (QStyleFactory::create() returns null for the desired styles). Not sure what I am missing here.

          C Offline
          C Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 22 Nov 2022, 15:39 last edited by
          #4

          @JW16 said in How to utilize Qt plugins when building Qt from source?:

          You mean build it using the same qmake version?

          qmake? Doesn't matter.
          You have to build the plugin with the same Qt version as your app, you want to use the plugin in, is using.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • J Offline
            J Offline
            JW16
            wrote on 22 Nov 2022, 19:00 last edited by
            #5

            Thanks, I realized I just had my release/debug builds of Qt mixed up... doh

            1 Reply Last reply
            0

            5/5

            22 Nov 2022, 19:00

            • Login

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