Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Creating plugins for QT Creator

Creating plugins for QT Creator

Scheduled Pinned Locked Moved Qt Creator and other tools
3 Posts 3 Posters 1.6k 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.
  • M Offline
    M Offline
    Moschops
    wrote on last edited by
    #1

    I'm trying to chase down information on this. The QT documentation is somewhat sparse, but as far as I can make out, if I make a plugin for QT Creator, if I want to distribute it, I have to separately rebuild it for every version of QT Creator, built with every possible compiler that the user's QT Creator might have been built with. Is that right? I think that's what this page is talking about: http://qt-project.org/doc/qt-4.8/deployment-plugins.html

    Some documentation seems to say that if I want to build a QT Creator plugin, I have to rebuild the entire QT Creator. That can't be right; end users just install a QT Creator plugin and away they go - they don't need to go recompiling anything, surely?

    To quell my confusion, I found a QTCreator plugin on sourceforge and had a look at it; it's a single *.so file, and an xml file containing this:

    bq. <plugin name="QtcCppcheck" version="3.2.1" compatVersion="3.2.1">
    <vendor>Gres</vendor>
    <category>Code Analyzer</category>
    <copyright>(C) Gres</copyright>
    <license>MIT license</license>
    <description>Integrates Cppcheck tool into Qt Creator</description>
    <url>http://gres.biz/qtc-cppcheck</url>
    <dependencyList>
    <dependency name="Core" version="3.2.1"/>
    <dependency name="ProjectExplorer" version="3.2.1"/>
    </dependencyList>
    </plugin>

    So if I'm reading this correctly, it needs a "Core" compatible with V3.2.1, and a "ProjectExplorer" also compatible with V3.2.1

    3.2.1 of what? Core certainly sounds familiar, but ProjectExplorer?

    The goal is to end up with some kind of self-contained set of plugin files that the user can be given and, after installing, the new functionality appears in their QTCreator. having to build a separate one for every possible version of QTCreator built with every possible set of QT Libraries and every possible compiler/linker seems so ridiculous that I must be misunderstanding things.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andrep
      wrote on last edited by
      #2

      "Core" and "ProjectExplorer" refer to Qt Creator plugins, version 3.2.1 in this case.

      1 Reply Last reply
      0
      • hskoglundH Offline
        hskoglundH Offline
        hskoglund
        wrote on last edited by
        #3

        Hi, when you want to compile your plugin, you need (in you .pro file) to point out where the sources and binaries for the target QtCreator are. This is needed for a successful compilation of your plugin.
        (And that's why you need first to compile QtCreator itself. I.e. you don't really need the app, just some other files). Also building in debug mode is not recommended, both QtCreator and your plugin should be compiled in Release mode.

        Once you have the .dll for you plugin, you can copy it to any Qt installation (along with the .pluginspec file). When QtCreator starts and loads the plugins, it checks that the plugins are built against the same version, right now it's 3.2.1. This is to make sure the shared data structures are intact across DLL boundaries etc.

        Last year I built a plugin for "Wordstar emulation":https://github.com/tungware/GeezerEditQt it works fine on Windows, Mac and Linux, but I have to recompile it (and QtCreator) when there's a new Qt release :-(

        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