How to add fileutils plugin to Qt project
-
So I want to use the function, *void FileUtils::showInGraphicalShell (QWidget parent, const QString &pathIn) to show files in an explorer.
I get the information from here: https://stackoverflow.com/questions/3490336/how-to-reveal-in-finder-or-show-in-explorer-with-qt
When I go to the link: https://github.com/qt-creator/qt-creator/blob/master/src/plugins/coreplugin/fileutils.cpp#L67
it shows a cpp file.And https://github.com/danimo/qt-creator/tree/master/src/libs/utils shows more cpp and header files.
Do I need to build a dll to add fileutils in a Qt Project? But I can't find a makefile on the github. Thanks in advance.
-
@BadPistol97 said in How to add fileutils plugin to Qt project:
Do I need to build a dll to add fileutils in a Qt Project? But I can't find a makefile on the github.
there is a utils.pro file. run qmake on it and you have your makefile.
-
Hi @raven-worx
I am using Qt MinGW530_32 compiler and have set the path:
But when I try qmake utils.pro:
Not quite sure why did the error happened.
-
Is Anaconda not for python ?
Have you inserted the Qt's Path in your system environment path ? -
@BadPistol97 you should open
utils.pro
in QtCreator and compile from there. This will give you a proper environment.But please keep in mind, that these source files are GPL licensed. If you use them, your whole program will be GPL affected.
Regards
-
@aha_1980 Thanks for reminding me the license.
Now I notice there are 2 folders containing filetutils.cpp
-
https://github.com/qt-creator/qt-creator/tree/master/src/libs/utils
-
https://github.com/qt-creator/qt-creator/tree/master/src/plugins/coreplugin
Should I go for /lib or /plugins?
And I am not sure how to open the .pro file correctly in Qt Creator.
-
-
@BadPistol97 if I get it correctly, you need
fileutils
fromcoreplugin
.I'm, however, not convinced that is the best solution to build whole coreplugin for one function. Rather analyze this function, and re-write the essential part yourself. Should not be that hard.