Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Solved New platform based on "minimal" not being recognized.

    Mobile and Embedded
    2
    6
    1193
    Loading More Posts
    • 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.
    • T
      theonlylawislove last edited by

      I am using Qt 5.3.2.

      I am using .pro file based on this. Here is mine...

      TARGET = qminimal
      TEMPLATE = lib
      
      PLUGIN_TYPE = platforms
      PLUGIN_CLASS_NAME = QMinimalIntegrationPlugin
      
      QT += core-private gui-private platformsupport-private
      
      SOURCES =   main.cpp \
                  qminimalintegration.cpp \
                  qminimalbackingstore.cpp
      HEADERS =   qminimalintegration.h \
                  qminimalbackingstore.h
      
      OTHER_FILES += minimal.json
      

      I copied the other files cpp files as well.

      However, when I run my app with -platform minimal, it says that it cannot find it. The QT_QPA_PLATFORM_PLUGIN_PATH is set to the correct directory. The moment I replace the distributed qminimal.dll with my own, it doesn't show up anymore for me to use.

      The error message I get is "The application failed to start because it could not find or load the Qt platform plugin "minimal". The message lists of all the available platforms to choose from, and minimal isn't showing up there either.

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Without the implementation details it's hard to say what's going wrong.

        Out of curiosity, why replace an existing plugin and not give it a name ?

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

        T 1 Reply Last reply Reply Quote 0
        • T
          theonlylawislove @SGaist last edited by

          @SGaist

          Out of curiosity, why replace an existing plugin and not give it a name ?

          I first wanted to build a plugin to make sure everything is properly configured. Then, I will rename everything and make it "mine".

          I'd be willing to pay good money if you (or someone else) is willing to do some contract work.

          1 Reply Last reply Reply Quote 0
          • T
            theonlylawislove last edited by

            The issue is in qlibrary.cpp.

            It looks like it is trying to find some sequence of char items in the library.

            char pattern[] = "qTMETADATA  ";
            pattern[0] = 'Q'; // Ensure the pattern "QTMETADATA" is not found in this library should QPluginLoader ever encounter it.
            

            Any ideas?

            1 Reply Last reply Reply Quote 0
            • T
              theonlylawislove last edited by

              It turns out that I had to include the following in my main.cpp.

              #include "main.moc"
              

              Then, it worked!

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                Glad you found out and thanks for sharing !

                Since you have it working now, please mark the thread as solved using the "Topic Tool" button so that other forum users may know a solution has been found :) (you have to first change the original post to a question)

                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 Reply Quote 0
                • First post
                  Last post