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. Style Plugin Example does not show red Button
Forum Updated to NodeBB v4.3 + New Features

Style Plugin Example does not show red Button

Scheduled Pinned Locked Moved Unsolved General and Desktop
10 Posts 3 Posters 1.9k 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.
  • S Offline
    S Offline
    samdol
    wrote on last edited by
    #1

    Hi,

    I have run Style Plugin Example in Qt5.6
    But I don't see the red button. Is it a bug?
    I am using Windows 7.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      hi
      Most likely the plugin dll was not copied to the right folder.
      This seems to be QTDIR/plugins/styles but not sure as I never made a Style plugin.
      Its not a bug with the sample as such.

      http://doc.qt.io/qt-5/plugins-howto.html

      S 1 Reply Last reply
      0
      • mrjjM mrjj

        hi
        Most likely the plugin dll was not copied to the right folder.
        This seems to be QTDIR/plugins/styles but not sure as I never made a Style plugin.
        Its not a bug with the sample as such.

        http://doc.qt.io/qt-5/plugins-howto.html

        S Offline
        S Offline
        samdol
        wrote on last edited by samdol
        #3

        @mrjj
        Thanks,
        I found that the plugins at
        C:...\styleplugin\release\styles\libsimplestyleplugin.a
        C:...\styleplugin\release\styles\simplestyleplugin.dll
        Isn't it the right location?
        The excutable was created in
        C:...\styleplugin\release\styleplugin.exe
        But still I don't see the red button.
        I also put libsimplestyleplugin.a and simplestyleplugin.dll to
        QTDIR/plugins/styles
        but I could not see the red button.

        mrjjM 1 Reply Last reply
        0
        • S samdol

          @mrjj
          Thanks,
          I found that the plugins at
          C:...\styleplugin\release\styles\libsimplestyleplugin.a
          C:...\styleplugin\release\styles\simplestyleplugin.dll
          Isn't it the right location?
          The excutable was created in
          C:...\styleplugin\release\styleplugin.exe
          But still I don't see the red button.
          I also put libsimplestyleplugin.a and simplestyleplugin.dll to
          QTDIR/plugins/styles
          but I could not see the red button.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @samdol said in Style Plugin Example does not show red Button:

          simplestyleplugin.dll

          Hi , i think it needs to be placed in predefined folder unless the sample
          uses other means to load it.

          S 1 Reply Last reply
          0
          • mrjjM mrjj

            @samdol said in Style Plugin Example does not show red Button:

            simplestyleplugin.dll

            Hi , i think it needs to be placed in predefined folder unless the sample
            uses other means to load it.

            S Offline
            S Offline
            samdol
            wrote on last edited by samdol
            #5

            @mrjj
            Does predefined folder mean QTDIR/plugins/styles?
            I also put libsimplestyleplugin.a and simplestyleplugin.dll to there, but it did not make any change.
            I used Qt windows binary version.
            Do I have to compile Qt itself to use plugin?

            mrjjM 1 Reply Last reply
            0
            • S samdol

              @mrjj
              Does predefined folder mean QTDIR/plugins/styles?
              I also put libsimplestyleplugin.a and simplestyleplugin.dll to there, but it did not make any change.
              I used Qt windows binary version.
              Do I have to compile Qt itself to use plugin?

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by mrjj
              #6

              @samdol said in Style Plugin Example does not show red Button:

              QTDIR/plugins/styles

              Yes I think so. I have not tried a Style plugin but it was the same with designer plugin.
              Should be placed in right folder.
              It should be clear from reading the docs.

              Update:
              The sample says
              "We set the library to be stored in the styles folder under stylewindow because this is a path in which Qt will search for style plugins."
              So maybe it looks there.

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

                Hi,

                You should also add QT_DEBUG_PLUGINS=1 to the environment variables in the Run part of the project panel. That should give you more clues about why it doesn't load.

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

                S 1 Reply Last reply
                1
                • SGaistS SGaist

                  Hi,

                  You should also add QT_DEBUG_PLUGINS=1 to the environment variables in the Run part of the project panel. That should give you more clues about why it doesn't load.

                  S Offline
                  S Offline
                  samdol
                  wrote on last edited by
                  #8

                  @SGaist
                  Thanks, I put qputenv("QT_DEBUG_PLUGINS", QByteArray("1")); before
                  QApplication app(argv, args); in main(). And I got the following output,
                  It seems it loaded the simplestyleplugin.dll. I don't understand why it checks
                  C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/accessible which I don't have. And it
                  says libsimplestyleplugin.a is not a plugin. I heard that .a is a static
                  library. This example is for dynamic plugin. I have no idea why I created a
                  static library.

                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms" ...
                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qminimal.dll"
                  Found metadata in lib C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qminimal.dll, metadata=
                  {
                      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                      "MetaData": {
                          "Keys": [
                              "minimal"
                          ]
                      },
                      "className": "QMinimalIntegrationPlugin",
                      "debug": false,
                      "version": 329218
                  }
                  Got keys from plugin meta data ("minimal")
                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qminimald.dll"
                  Found metadata in lib C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qminimald.dll, metadata=
                  {
                      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                      "MetaData": {
                          "Keys": [
                              "minimal"
                          ]
                      },
                      "className": "QMinimalIntegrationPlugin",
                      "debug": true,
                      "version": 329218
                  }
                  
                  
                  "The plugin 'C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qminimald.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                           not a plugin
                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qoffscreen.dll"
                  Found metadata in lib C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qoffscreen.dll, metadata=
                  {
                      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                      "MetaData": {
                          "Keys": [
                              "offscreen"
                          ]
                      },
                      "className": "QOffscreenIntegrationPlugin",
                      "debug": false,
                      "version": 329218
                  }
                  Got keys from plugin meta data ("offscreen")
                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qoffscreend.dll"
                  Found metadata in lib C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qoffscreend.dll, metadata=
                  {
                      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                      "MetaData": {
                          "Keys": [
                              "offscreen"
                          ]
                      },
                      "className": "QOffscreenIntegrationPlugin",
                      "debug": true,
                      "version": 329218
                  }
                  
                  
                  "The plugin 'C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qoffscreend.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                           not a plugin
                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qwindows.dll"
                  Found metadata in lib C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qwindows.dll, metadata=
                  {
                      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                      "MetaData": {
                          "Keys": [
                              "windows"
                          ]
                      },
                      "className": "QWindowsIntegrationPlugin",
                      "debug": false,
                      "version": 329218
                  }
                  Got keys from plugin meta data ("windows")
                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qwindowsd.dll"
                  Found metadata in lib C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qwindowsd.dll, metadata=
                  {
                      "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
                      "MetaData": {
                          "Keys": [
                              "windows"
                          ]
                      },
                      "className": "QWindowsIntegrationPlugin",
                      "debug": true,
                      "version": 329218
                  }
                  
                  
                  "The plugin 'C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qwindowsd.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)"
                           not a plugin
                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/platforms" ...
                  loaded library "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qwindows.dll"
                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platformthemes" ...
                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/platformthemes" ...
                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/styles" ...
                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles" ...
                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles/libsimplestyleplugin.a"
                  "Failed to extract plugin meta data from 'C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles/libsimplestyleplugin.a'"
                           not a plugin
                  QFactoryLoader::QFactoryLoader() looking at "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles/simplestyleplugin.dll"
                  Found metadata in lib C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles/simplestyleplugin.dll, metadata=
                  {
                      "IID": "org.qt-project.Qt.QStyleFactoryInterface",
                      "MetaData": {
                          "Keys": [
                              "simplestyle"
                          ]
                      },
                      "className": "SimpleStylePlugin",
                      "debug": false,
                      "version": 329218
                  }
                  Got keys from plugin meta data ("simplestyle")
                  loaded library "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles/simplestyleplugin.dll"
                  currentdir:  "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release"
                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/accessible" ...
                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/accessible" ...
                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/accessiblebridge" ...
                  QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/accessiblebridge" ...
                  
                  
                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    From this line: loaded library "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles/simplestyleplugin.dll" it looks like it has been loaded, no ?

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

                    S 1 Reply Last reply
                    1
                    • SGaistS SGaist

                      From this line: loaded library "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles/simplestyleplugin.dll" it looks like it has been loaded, no ?

                      S Offline
                      S Offline
                      samdol
                      wrote on last edited by
                      #10

                      @SGaist
                      I think so. But I don't see the red button somehow.

                      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