[Qt-creator] Odp: Adding folder with sources to project

André Pönitz andre.poenitz at mathematik.tu-chemnitz.de
Thu Feb 14 22:26:00 CET 2013

On Thu, Feb 14, 2013 at 09:28:15PM +0100, Paweł Faron wrote:
> >> I have a question. After "Importing Project" to QtCreator I have
> >> the possibility to "Add Existing Files...", where I can choose
> >> single files and add them.
> >> 
> >> But What I really want is the possibility to choose a directory
> >> from which QtCreator should pick files (and from subdirectories)
> >> and add them to project. It's should be also great to have the
> >> possibility to specify what file extensions I'm interested in.
> >Click on "Edit files".
> >> Is it a big effort to implement such a functionality?
> >Yes.
> >daniel
> Totally not knowing QtCreator source code I was able to add this
> functionality in coupe of minutes (excluding build and run time).
> Details below:
> There is a function:
> void ProjectExplorerPlugin::addExistingFiles(const QStringList
> &filePaths)
> which is invoked when a user select files to add. When we give it
> files from different directories it behaves correctly.
> So all we need to do is to add new action (e.g. ?Add Existing
> Directory??) in which we allow a user to choose directory which we
> recursively search for files and invoke this function with list of
> those files.
> If I?ll create some patch for this functionality will you add it to
> QtCreator? 

Depends of course on what exactly you write in the patch ;-)

But sure, it's possible and not unusual to directly contribute to
Qt Creator development.

The process to follow is pretty much the same as for Qt itself. See 


for details.

This might look a bit complex on first sight, but really isn't too bad.
Most of it is a one-time activity (reading the rules, setting up the
gerrit account), after that it's pretty streamlined. 

If you have troubles to get started, feel free to ask on #qt-creator
on FreeNode IRC, or here.


More information about the Qt-creator mailing list