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. Qt Creator and adding plugins - kindly help
Forum Updated to NodeBB v4.3 + New Features

Qt Creator and adding plugins - kindly help

Scheduled Pinned Locked Moved Qt Creator and other tools
18 Posts 4 Posters 10.5k Views 1 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.
  • D Offline
    D Offline
    Dcqt
    wrote on last edited by
    #2

    I heard there is a plug-in for eclipse IDE for running android mobile applications.

    i want to do the same with Qt Creator, does it allow us to do the same.

    i read that Qt creator allow us to develop plug-in's( i am having hard time doing that) , but does that give an interface where we write some code to run applications contained in plug-in.

    if needed i am going to elaborate the requirement..
    please kindly reply..

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #3

      You might want to have a look "onto the wiki":http://qt-project.org/wiki/Qt5ForAndroidBuilding However, there are more articles on Android using Qt in the wiki.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Dcqt
        wrote on last edited by
        #4

        I don't want to do any thing on Android.
        I just want to know , in Qt creator can i add my own plug-in?
        that plug-in is going to contain some applications, and then i want to write some code to run the applications present in the plug-in.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sergey-shambir
          wrote on last edited by
          #5

          Actually QtCreator plugins are modules. In other words, there are no stable API and ABI, any method can be renamed or it's behaviour can be changed in future version. So, you will have to update plugin for each new version (~once per 4 months) or add it to upstream.

          In the other hand, methods of any exported class are API, and you can send patches to codereview in order to extend plugins API.

          About your compile error: are you using latest sources from master? If you are, I know where is problem. Most of QtCreator plugins depend on other plugins: ProjectExplorer depends on Core, CppEditor depends on ProjectExplorer and CppTools, etc. A few weeks ago Oswald Buddenhagen commited patch that changed a way to specify plugin dependencies. Now if you have plugin PluginName (and project file pluginname.pro), you should create pluginname_dependencies.pri similar to this:

          @
          QTC_PLUGIN_NAME = ClangCodeModel
          QTC_LIB_DEPENDS +=
          utils
          QTC_PLUGIN_DEPENDS +=
          coreplugin
          cpptools
          texteditor
          @

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tobias.hunger
            wrote on last edited by
            #6

            bq. I heard there is a plug-in for eclipse IDE for running android mobile applications.
            i want to do the same with Qt Creator, does it allow us to do the same.

            You can develop for android phones using Qt Creator, yes.

            bq. i read that Qt creator allow us to develop plug-in’s( i am having hard time doing that) ,

            Yes, you can develop plugins for Qt Creator. In fact Qt Creator is basically a plugin loader only that comes bundled with a list of plugins that implement almost all the functionality you see.

            bq. but does that give an interface where we write some code to run applications contained in plug-in.

            Applications contained in a plugin? I don't understand what you are going at here, sorry.

            bq. if needed i am going to elaborate the requirement.. please kindly reply..

            That might help, yes:)

            1 Reply Last reply
            0
            • D Offline
              D Offline
              Dcqt
              wrote on last edited by
              #7

              [quote author="sergey-shambir" date="1366298783"]Actually QtCreator plugins are modules. In other words, there are no stable API and ABI, any method can be renamed or it's behaviour can be changed in future version. So, you will have to update plugin for each new version (~once per 4 months) or add it to upstream.

              In the other hand, methods of any exported class are API, and you can send patches to codereview in order to extend plugins API.

              About your compile error: are you using latest sources from master? If you are, I know where is problem. Most of QtCreator plugins depend on other plugins: ProjectExplorer depends on Core, CppEditor depends on ProjectExplorer and CppTools, etc. A few weeks ago Oswald Buddenhagen commited patch that changed a way to specify plugin dependencies. Now if you have plugin PluginName (and project file pluginname.pro), you should create pluginname_dependencies.pri similar to this:

              @
              QTC_PLUGIN_NAME = ClangCodeModel
              QTC_LIB_DEPENDS +=
              utils
              QTC_PLUGIN_DEPENDS +=
              coreplugin
              cpptools
              texteditor
              @
              [/quote]

              this is the place where i downloaded the Qt Creator sources.

              http://qt.gitorious.org/qt-creator/qt-creator/trees/master

              i really dont know about the dependency files until today , and i read it as used to specify the sub folder in project.

              but dont know how to create one.

              do i need to add the above mentioned code to make it work.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                sergey-shambir
                wrote on last edited by
                #8

                You can create it manually: if you plugin and *.pro file named SomethingBeautiful, create file somethingbeautiful_dependencies.pri and add all this code (but of course, QTC_PLUGIN_NAME should be SomethingBeautiful). In this case, plugin will depend on Core (coreplugin), CppTools (cpptools) and TextEditor (texteditor).

                Each plugin depends on others, and most important plugins are Core (core functions like MIME-type, session and UI management), ProjectExplorer (base for all project managers and build settings), CppTools (provides both interface and most part of reference implementation for C++ support in editor). Also you can look at Android and QtSupport.

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  Dcqt
                  wrote on last edited by
                  #9

                  [quote author="Tobias Hunger" date="1366299639"]
                  if needed i am going to elaborate the requirement.. please kindly reply..

                  That might help, yes:)[/quote]

                  • this is not a mobile , but Desktop *

                  The plug-in i am going to add to Qt Creator will have some applications(games, facebook, media player , address book, etc..)

                  which are all controlled by some gui that is embedded as default main application.

                  now when i load my plugin which should just display the gui for controlling apps.

                  after that i will specify what ever app i want to run and it should run.

                  not exactly , but it is some thing like this..

                  @int main()
                  {
                  ControlWindow CW;
                  CW.show();
                  }
                  @

                  default, which displays the Controlwindow.

                  @int main()
                  {
                  ControlWindow CW;
                  facebook Fb;
                  CW.show();
                  }
                  @

                  should run facebook on the window

                  @int main()
                  {
                  ControlWindow CW;
                  Mediaplayer Mb;
                  CW.show();
                  }
                  @

                  should run media player on the window

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    Dcqt
                    wrote on last edited by
                    #10

                    [quote author="sergey-shambir" date="1366488549"]You can create it manually: if you plugin and *.pro file named SomethingBeautiful, create file somethingbeautiful_dependencies.pri and add all this code (but of course, QTC_PLUGIN_NAME should be SomethingBeautiful). In this case, plugin will depend on Core (coreplugin), CppTools (cpptools) and TextEditor (texteditor).

                    Each plugin depends on others, and most important plugins are Core (core functions like MIME-type, session and UI management), ProjectExplorer (base for all project managers and build settings), CppTools (provides both interface and most part of reference implementation for C++ support in editor). Also you can look at Android and QtSupport.[/quote]

                    i have created _dependencies.pri file with the same name as .pro

                    now it is saying
                    Project LOAD(): Feature /home/Plugs/qt-creator-qt-creator/src/qtcreatorplugin.pri cannot be found.

                    TARGET = appshub
                    TEMPLATE = lib

                    DEFINES += APPSHUB_LIBRARY

                    appshub files

                    SOURCES += appshubplugin.cpp

                    HEADERS += appshubplugin.h
                    appshub_global.h
                    appshubconstants.h

                    Qt Creator linking

                    set the QTC_SOURCE environment variable to override the setting here

                    QTCREATOR_SOURCES = $$(QTC_SOURCE)
                    isEmpty(QTCREATOR_SOURCES):QTCREATOR_SOURCES=/home/Plugs/qt-creator-qt-creator

                    set the QTC_BUILD environment variable to override the setting here

                    IDE_BUILD_TREE = $$(QTC_BUILD)
                    isEmpty(IDE_BUILD_TREE):IDE_BUILD_TREE=/home/Plugs/qt-creator-qt-creator/qtcreator-build

                    uncomment to build plugin into user config directory

                    <localappdata>/plugins/<ideversion>

                    where <localappdata> is e.g.

                    "%LOCALAPPDATA%\QtProject\qtcreator" on Windows Vista and later

                    "$XDG_DATA_HOME/data/QtProject/qtcreator" or "~/.local/share/data/QtProject/qtcreator" on Linux

                    "~/Library/Application Support/QtProject/Qt Creator" on Mac

                    USE_USER_DESTDIR = yes

                    PROVIDER = MyCompany

                    include($$QTCREATOR_SOURCES/src/qtcreatorplugin.pri)
                    include($$QTCREATOR_SOURCES/src/plugins/coreplugin/coreplugin.pri)

                    LIBS += -L$$IDE_PLUGIN_PATH/QtProject

                    OTHER_FILES +=
                    appshub_dependencies.pri

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      sergey-shambir
                      wrote on last edited by
                      #11

                      Where are placed QtCreator sources exactly?

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        Dcqt
                        wrote on last edited by
                        #12

                        Thanks for staying with me..

                        The location of qtCreator sources is

                        /home/Plugs/qt-creator-qt-creator

                        and build is
                        /home/Plugs/qt-creator-qt-creator/qtcreator-build

                        which is inside qt-creator-qt-creator

                        i checked for qtcreatorplugin.pri file and it is present in the src folder.

                        for your reference :
                        i dint mention this before, i dint follow these steps

                        @ cd <QtSources>
                        configure -developer-build
                        make@

                        i directly followed steps

                        @cd <QtCreatorSources>/..
                        mkdir qtcreator-build
                        cd qtcreator-build
                        <QtInstall>/bin/qmake -r <QtCreatorSources>
                        make@

                        mentioned here
                        http://doc.qt.digia.com/qtcreator-extending/getting-and-building.html

                        does it cause this problem .

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          sergey-shambir
                          wrote on last edited by
                          #13

                          Please check exact path with 'ls' utility: /home/Plugs/qt-creator-qt-creator/src/qtcreatorplugin.pri

                          1 Reply Last reply
                          0
                          • D Offline
                            D Offline
                            Dcqt
                            wrote on last edited by
                            #14

                            yes, i checked it and i am 100% sure it is present in the location. but how come it is not able to be found.

                            this is the procedure i am following.
                            1.Download the qt creator sources from
                            http://qt.gitorious.org/qt-creator/qt-creator/trees/master

                            1. Extract the tar.zip you get folder
                              qt-creator-qt-creator

                            cd qt-creator-qt-creator
                            mkdir qtcreator-build
                            cd qtcreator-build
                            <QtInstall>/bin/qmake -r QT_PRIVATE_HEADERS=<QtSources>/include <QtCreatorSources>

                            QtInstall = /usr/local/Trolltech/Qt-4.8.0

                            QtSources = Qt4.8 sources path

                            QtCreatorSources = /home/Plugs/qt-creator-qt-creator

                            substitue the above values respectively and press enter

                            after the step the qtcreator-build directory gets below

                            app libs Makefile plugins tools

                            while creating the project
                            i am creating my plugin project inside
                            /home/Plugs/qt-creator-qt-creator/src/plugin/

                            and the source and build directories are specified as below.

                            Qt Creator sources: /home/Plugs/qt-creator-qt-creator
                            Qt Creator build: /home/Plugs/qt-creator-qt-creator/qtcreator-build

                            open a text file save it with pluginname_dependencies.pri
                            and copy the conetents of pluginname.pro into it and add lines

                            @ QTC_PLUGIN_NAME = pluginname
                            QTC_LIB_DEPENDS +=
                            utils
                            QTC_PLUGIN_DEPENDS +=
                            coreplugin
                            cpptools
                            texteditor@

                            above all the contents in the _dependencies.pri and save it.

                            now run

                            /usr/local/Trolltech/Qt-4.8.0/bin/qmake

                            Project LOAD(): Feature /home/Plugs/qt-creator-qt-creator/src/qtcreatorplugin.pri cannot be found.

                            *Request : *
                            I am doing all this to achieve my ultimate goal as mentioned above( to run my own applications using the plug-in)

                            Is that achievable?

                            1 Reply Last reply
                            0
                            • D Offline
                              D Offline
                              Dcqt
                              wrote on last edited by
                              #15

                              sergey-shambir kindly reply
                              i need to update the result to my superior.

                              1 Reply Last reply
                              0
                              • T Offline
                                T Offline
                                tobias.hunger
                                wrote on last edited by
                                #16

                                Are you talking about writing plugins that are meant to be used in Qt Creator or are you talking about using Qt Creator to write an other application that is using its own plugins?

                                1 Reply Last reply
                                0
                                • D Offline
                                  D Offline
                                  Dcqt
                                  wrote on last edited by
                                  #17

                                  Thanks for the reply..
                                  I think the second one you mentioned suits my requirement.

                                  when we create a project in Qt, generally we are asked for QMainWindow,QWidget and QDialouge, and based on what we select basic appilcation is created with some .cpp and .h files. , if i run this application a defualt window is shown. we can build up our own application on this.

                                  I want to develop the same(like QMainWindow or QWidget or QDialouge but with my own container ) using Qt Creator and also want to add that to Qt Creator, upon running my basic application i want to display a keypad and a display window.
                                  display window is used to display my furthur applications(need to code for that), keypad is used to control that applications.

                                  an application can be a video player( i can do play , pause ect using keypad) or a game (i naviagate using arrow keys)

                                  i hope it is clear now.

                                  1 Reply Last reply
                                  0
                                  • T Offline
                                    T Offline
                                    tobias.hunger
                                    wrote on last edited by
                                    #18

                                    So you want "Dcqt's special project" show up in File->New Project?

                                    Check this for information on how to add "project wizards": http://qt-project.org/doc/qtcreator-2.7/creator-project-wizards.html

                                    If you want to do something more complex you can also do that, but that will require some C++ coding in Creator then.

                                    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