I'm sure there are a lot of developers around using Qt Creator to adapt, build and debug code that is built using SCons.

I wonder if there are other people having the same issue as I have. I'm using VariantDir in my SConstruct, to make sure that generated files (moc, ui's, also other generated files) are put in a separate build folder. This way, the source folder is not cluttered with other files (that's also nice for versioning, since you know that everything in your source folders need to be checked in).

When I start building in Qt Creator, the issues are always pointing to the files in the build folder. It happens a lot of times that I forget about this: I start changing the source files in the build folder and after pressing "Build", Qt Creator warns me that the build files are getting overwritten: darn, wrong source file !

The same thing happens when I'm debugging: what you will see during the debugging, are the source files copied over to the build folder. Again, I make the mistake quite often of stopping the debugging (when I see some unexpected behaviour during debugging) and by accident I immediately start to adapt the code in the build folder.

Are there any strategies to avoid this ?

I cannot get rid of VariantDir in my SCons scripts and I cannot set "duplicate" to 0, because my source files are referring to the generated (Qt or non-Qt) files: so please, do not offer this as a solution.

Cheers,
Benedikt.