Qt Plugins external folder?
-
Hi,
From a quick look at the sources, Qt Creator has a
-pluginpath
parameter that you can use to give additional paths to search for plugins.Hope it helps
-
the point is i want to double click the icon, not use the command line to launch with extra params. and before you suggest it: creating a script i double click on isn't the solution.
i see in the qt.conf file this line
Plugins=../PlugIns;/Users/davec/Library/Application Support/QtProject/qtcreator/plugins
however, putting my plugin there DOES NOT load it. why?
-
To check the why, you should start Qt Creator from the command line so you can set the QT_DEBUG_PLUGINS environment variable and see what happens.
-
it's a bug. i've tried literally every possible approach. shows no errors, just won't load. i've even tried symlink directly from inside the app bundle but nope. the only way to get the plugin to load is to directly install it inside the app bundle (or launch qt creator with a script that passes in my plugins directory, even if it is identical directory to what is in the qt.conf file)
-
when developing a Plugin for Qt Creator, that shows in the Tools menu, currently it seems i must install this plugin inside the Qt Creator.app folder.
is there a default plugins folder where Qt Creator will look to load plugins that are NOT installed inside its own bundle?
@davecotter Here is how I develop my Qt Creator plugins. Currently doing https://github.com/cristianadam/llama.qtcreator/
A "+" kit with the path to the Qt Creator with plugins dev support
I have a Kit with an updated
CMAKE_PREFIX_PATH
:-DCMAKE_PREFIX_PATH:FILEPATH=%{Qt:QT_INSTALL_PREFIX};/Users/cristian/Applications/Qt Creator 17.0.1/Qt Creator.app/Contents/Resources
A custom executable pointing to Qt Creator
Executable:
%{IDE:Executable:FilePath}
Command line arguments:-pluginpath %{buildDir}
This way I can start Qt Creator with my plugin. I can debug my plugin ... etc.
-
@davecotter Here is how I develop my Qt Creator plugins. Currently doing https://github.com/cristianadam/llama.qtcreator/
A "+" kit with the path to the Qt Creator with plugins dev support
I have a Kit with an updated
CMAKE_PREFIX_PATH
:-DCMAKE_PREFIX_PATH:FILEPATH=%{Qt:QT_INSTALL_PREFIX};/Users/cristian/Applications/Qt Creator 17.0.1/Qt Creator.app/Contents/Resources
A custom executable pointing to Qt Creator
Executable:
%{IDE:Executable:FilePath}
Command line arguments:-pluginpath %{buildDir}
This way I can start Qt Creator with my plugin. I can debug my plugin ... etc.
For the first point on macOS you need to use the "installer" https://download.qt.io/official_releases/qtcreator/17.0/17.0.1/qt-creator-opensource-mac-x86_64-17.0.1_installer.dmg
This is how I've installed the Qt Creator SDK for developing plugins.
-
@cristian-adam thanks for that but the point is i want to be able to just "double click" the regular "Qt Creator" app, and have it auto-load my plugin. without having to launch on the command line and pass the path, without having to launch a script that launches the app with the path, and certainly without having to launch Qt Creator to launch Qt Creator.
-
@cristian-adam thanks for that but the point is i want to be able to just "double click" the regular "Qt Creator" app, and have it auto-load my plugin. without having to launch on the command line and pass the path, without having to launch a script that launches the app with the path, and certainly without having to launch Qt Creator to launch Qt Creator.
@davecotter The plugins are located in these directories (for manual installation / deletion):
macOS:
~/Library/Application\ Support/QtProject/Qt\ Creator/plugins/17.0.1
Linux:~/.local/share/data/QtProject/qtcreator/plugins/17.0.1
Windows:%localappdata%\QtProject\QtCreator\plugins\17.0.1
-
Test Results Summary:
✅ Test 1: Explicit -pluginpath
Path: /Users/davec/Library/Application Support/QtProject/qtcreator/plugins
RESULT: SUCCESS - Plugin loaded and MCP server responding❌ Test 2: Default plugin locations
No -pluginpath argument
RESULT: FAILURE - Plugin not loaded, MCP server not responding❌ Test 3: Qt Creator 17.0.1 specific path
Path: ~/Library/Application Support/QtProject/Qt Creator/plugins/17.0.1
RESULT: FAILURE - Plugin not loaded, MCP server not responding❌ Test 4: Symlink inside app bundle
RESULT: FAILURE - Plugin not loaded
Method: Symlink from "/Users/davec/Developer/Qt/Qt Creator.app/Contents/PlugIns/external" to plugin directory✅ Test 5: SUCCESS: Plugin in qtcreator directory
Location: /Users/davec/Developer/Qt/Qt Creator.app/Contents/PlugIns/qtcreator/
RESULT: Plugin loaded successfully! -
Test Results Summary:
✅ Test 1: Explicit -pluginpath
Path: /Users/davec/Library/Application Support/QtProject/qtcreator/plugins
RESULT: SUCCESS - Plugin loaded and MCP server responding❌ Test 2: Default plugin locations
No -pluginpath argument
RESULT: FAILURE - Plugin not loaded, MCP server not responding❌ Test 3: Qt Creator 17.0.1 specific path
Path: ~/Library/Application Support/QtProject/Qt Creator/plugins/17.0.1
RESULT: FAILURE - Plugin not loaded, MCP server not responding❌ Test 4: Symlink inside app bundle
RESULT: FAILURE - Plugin not loaded
Method: Symlink from "/Users/davec/Developer/Qt/Qt Creator.app/Contents/PlugIns/external" to plugin directory✅ Test 5: SUCCESS: Plugin in qtcreator directory
Location: /Users/davec/Developer/Qt/Qt Creator.app/Contents/PlugIns/qtcreator/
RESULT: Plugin loaded successfully!@davecotter I have this plugin loaded:
/Users/cristian/Library/Application\ Support/QtProject/Qt\ Creator/plugins/17.0.1/ggml.llamacpp/Qt\ Creator.app/Contents/PlugIns/qtcreator/libLlamaCpp.dylib
Qt Creator does log the plugin paths it looks into, when enabling logging:
QT_LOGGING_RULES=qtc.extensionsystem*=true ./Qt\ Creator
I've got:
qtc.extensionsystem: Plugin search paths: QList("/Users/cristian/Applications/Qt Creator 17.0.1/Qt Creator.app/Contents/PlugIns/qtcreator", "/Users/cristian/Applications/Qt Creator 17.0.1/Qt Creator.app/Contents/Resources/lua-plugins", "/Users/cristian/.config/QtProject/qtcreator/lua-plugins", "/Users/cristian/Library/Application Support/QtProject/Qt Creator/plugins/17.0.1", "/Users/cristian/Library/Application Support/QtProject/Qt Creator/plugins/17.0.0")
-
i have this:
qtc.extensionsystem: Plugin search paths: QList( "/Users/davec/Developer/Qt/Qt Creator.app/Contents/PlugIns/qtcreator", "/Users/davec/Developer/Qt/Qt Creator.app/Contents/Resources/lua-plugins", "/Users/davec/Developer/Qt/Tools/QtCreator 17.0.1/PlugIns", "/Users/davec/.config/QtProject/qtcreator/lua-plugins", "/Users/davec/Library/Application Support/QtProject/Qt Creator/plugins/17.0.1", "/Users/davec/Library/Application Support/QtProject/Qt Creator/plugins/17.0.0" )
and yet:
❌ Test 3: Qt Creator 17.0.1 specific path
Path: ~/Library/Application Support/QtProject/Qt Creator/plugins/17.0.1
RESULT: FAILURE - Plugin not loaded, MCP server not responding -
okay so i think this is a bug