Solved Custom plugin with CMake
-
Thank you very much for the response. For the second and third questions if we can focus them on Linux that would be great for me.
-
@apalomer
Well its same in linux regarding placement.
so where u installed Qt + /Tools/QtCreator/bin/plugins/designer
You can do
locate Welcome.so to see
mine is in
/home/master/Qt5.7.1/Tools/QtCreator/bin/plugins/designer
but it depends on where you did in fact install it.In linux , you should use the same version of gcc as Creator was compiled with. ( there can be a bit more of version diff than in windows) But a Qt4 plugin in a Qt5 Creator is most likely asking too much.
Check in help->about Creator menu what version of gcc you need
-
UPDATE
Not enough coffee syndrom.
The path i shown is for Creator plugins.
You were actually asking for
xx/Tools/QtCreator/bin/plugins/designer -
Ok, I think I have it. Please go here if you want to see how I did it. Feel free to criticize it as much as possible, this way I will be able to improve it. It only works in Qt4. The Qt5 branch in the git repository only compiles the stand alone libraries and the cmake part is not well resolved as for Qt4.
-
Super and thx for sharing.
Very useful for people ever want to use cmake for plugins.
All docs uses qmake. -
That's why I posted it, I struggled for two days to get this working! XD
-
@apalomer
Yeah and while qmake.exe is pretty nice as a tool,
i found the language pretty awkward and non intuitive but luckly
there are tons of online help.Btw did you get Creator to syntax highlight the cmakle.txt file as it does with .pro file?
-
I have never used .pro files, so I don't really know what do you mean exactly.
-
@apalomer
when using .pro file, if you open it, in Creator,
it colors the keywords like it would in a .cpp/h file.
It can also autocomplete and guess like for class etc.With my brief encounters with cmake, it could not get it to do
any of these things even it does understand its a project file but its
shown as a text file with no coloring and no code completion possible.I just wondered if i had missed something to enable to make Creator provide such features
to cmake projects also. -
I do not know how I did it, but the CMake part works. CMake functions such as find_package, add_dependencies would be highlighted and you can also get the tooltip information as well as autocomplete. I do not know if it actually allows for autocomplete of anything that is not CMake built in (such as some macro that you might develop)