Qt Creator NOT looking in QT_INSTALL_PLUGINS
-
I make my own designer/qtcreator plugins. I many release them publicly one day.
To get the plugins directory, I did:
qmake -query QT_INSTALL_PLUGINS
and it prints:
/Development/Qt/5.7/gcc_64/plugins
I upgraded to qtcreateor 4.2.0. My plugins stopped working.
So I did a 'strace -f qtcreator |& tee LOG'
Yet the LOG produced by strace shows it NEVER opens the QT_INSTALL_PLUGINS directory.
So, HOW do I find the directory where qtcreator 4.2.0 looks for plugins?
-
@DougRoyer It will open them from $HOME//.local/share/data/QtProject/qtcreator/plugins/4.2.0
However they do not work.
@DougRoyer Finally figured it out. I had 2 problems.
(1) Finding out where it looks:
Got to menu Help->System Information ... Then look for "PluginsPath"
(2) I used sym-links, it ignores them. Had to do a copy.
-
Hi,
Qt Creator comes with its own version of Qt, it's in that one that it will look for plugins, not in one of Qt's version installation folder.
-
Hi,
Qt Creator comes with its own version of Qt, it's in that one that it will look for plugins, not in one of Qt's version installation folder.
-
No good. It never loads them in ANY plugins directory. EVER.
The most I can get it to do is stat() the files. It never opens them.
Does any one know HOW to figure out what directory they are loaded from?
@DougRoyer It will open them from $HOME//.local/share/data/QtProject/qtcreator/plugins/4.2.0
However they do not work.
-
@DougRoyer It will open them from $HOME//.local/share/data/QtProject/qtcreator/plugins/4.2.0
However they do not work.
@DougRoyer Finally figured it out. I had 2 problems.
(1) Finding out where it looks:
Got to menu Help->System Information ... Then look for "PluginsPath"
(2) I used sym-links, it ignores them. Had to do a copy.
-
Glad you found out and thanks for sharing.
Where exactly is the plugin folder located ?
-
@SGaist It depends on where qtcreator was installed. Where it is on my system may not be the same as another.
The QT plugin build instructions are WRONG. They say use the qmake QT_INSTALL_PLUGINS, however that is most certainly the wrong instructions.
On Fedora (Red Hat) and Ubuntu, the qtcreator and qmake paths are NOT the same. So, where to place the built plugins is anyone's guess.
If I do release my plugins, its going to have to have manual install instructions, because there is no automated way to find it.
-
The instructions are correct.
You are mixing handling of two different use cases. Qt Creator is a deployed application. The instructions have been written to integrate your custom Qt plugin with your Qt installation so you can build applications using it.
Your distribution provided Qt Creator will use your distribution installed Qt. However, if you install Qt Creator through e.g. the online installer, it will be an independent deployed application coming with its own version of Qt thus your custom plugin should go there.
-
No they are not correct. When I build using QMAKE, then install into QT_INSTALL_PLUGINS,
its just as likely to be in THE WRONG PLACE.There is no WAY to determine at plugin install time, where to place them, and there is NO guarantee that the qmake QT_INSTALL_PLUGINS path is the place.
Its turns out to be utterly irrelevant where qmake wants them, it does not use them.
The -query QT_INSTALL_PLUGINS needs to be on qtcreator and designer, and to ignore the one from qmake. Nether qtcreator or designer has the -query command line option. Thus there is no way to automate an install, because the answer from qmake only might be the correct place.
qmake does not get installed with qtcreator.
-
Again, developing a plugin for Qt Creator and developing a plugin for Qt is not the same process. The instructions you are following are for developing a Qt plugin.
As for Qt Creator, there's a dedicated project where you specify the information like sources of Qt Creator as well as deployment location. Did you use that for your plugin ?
It's described here.
-
NOTHING on that page tells you where to install the plugin. It tells you how to build one and where to place it at build time.
When installing an plugin, the user will not be building from source.
@DougRoyer "When installing an plugin, the user will not be building from source" - correct. It's your plug-in, so you have to provide an installation package or at least an installation description.
-
Exactly. There is NO way to determine the plugin path at install time. All of those instructions are for development time, not install time.
The script will have to manually ask the user to start qtcreator, look at what a pop-up says, and enter the value.
-
I'm also installing a plugin (Wordstar emulation) and on Debian/Ubuntu systems to install my .so file, to find Qt Creator's plugin path I open the file
~/.local/share/applications/qtcreator.desktop
and look for the path setting, in my case it's
Path=/home/henry/Qt/Tools/QtCreator/bin
then I toss the "/bin" suffix and add "/lib/qtcreator/plugins", like this:
/home/henry/Qt/Tools/QtCreator/lib/qtcreator/plugins
It has worked for me a couple of years but it's no guarantee :-)