[Interest] Interest Digest, Vol 19, Issue 82
andre.poenitz at mathematik.tu-chemnitz.de
Sat Apr 20 23:05:29 CEST 2013
On Fri, Apr 19, 2013 at 09:14:23PM +0100, Danny Price wrote:
> On 19 Apr 2013, at 20:49, André Pönitz
> <andre.poenitz at mathematik.tu-chemnitz.de> wrote:
> > On Fri, Apr 19, 2013 at 03:36:21PM +0100, Danny Price wrote:
> >> I've used QMake in two large cross-platform projects, one of which
> >> wasn't even a Qt application. I did look at other options including
> >> CMake and Premake 4 but decided to stick with QMake.
> >> Here are my thoughts:
> >> [...] - QtCreator's .pro file templates are embarrassingly bad and
> >> misleading. Don't use them.
> > I am sure you can support this claim by giving links to some more
> > detailed descriptions on bugreports.qt-project.org.
> > Andre'
> I've contributed a number of bug reports and patches to
> bugreports.qt-project.org, several of which are still marked as P2 or P1
> (take a look at 30657, 30279 or 30284 for example).
I appreciate that. In this particular case I was refering to a potential
"QtCreator's .pro file templates are embarrassingly bad and misleading.
Don't use them." report. Some of the items you mention below may actually
serve as base for such. Sorry for not being clear.
> But this falls more under the category of a feature request:
> - No subdir templates or wizards which means no way to create
> hierarchical projects within Creator. You have to use a separate text
> editor to create the pro files manually and then import them. QMake is
> fully capable of complex hierarchical projects including Creator itself
> and this should be promoted.
> - No templates or example projects for common things like an executable
> linking to a dependant library. This requires a surprising amount of work
> with QMake, more so to make it work correctly.
There's an "Add library..." context menu item in the .pro editor.
> - No binary or configuration directories - on Linux and Mac, all
> generated files, objects and binaries are dumped into one messy project
> directory (don't get me started on shadow builds - that wasn't a
I am not sure what you mean. Shadow builds are the canonical solution to
the "I want to keep my source tree clean" issue, independent of Qt Creator.
In the times of 'git clean -dxf' I personally feel the need for them rather
limited, but having them as an option can't be wrong?
> At the very least, Creator should be able to generate a project that the
> user can expand without having to read through documentation, like XCode
> and VisualStudio.
The templates contain SOURCES += ... and HEADERS += ... chunks, there's
the 'Add library' context menu helper, and thee QT += core gui line as
entry point for adding Qt modules. Expanding these parts should not
require documentation lookup, and, arguably, cover already quite a few
.pro file contents was meant to be written manually, not steered through
a gui. This is quite different from XCode and VS's "native" formats.
Handling it as "source code" with a specialized editor is a rather
natural decision from my point of view.
I wonder whether adding some comments to the .pro like "Add Qt modules
here" might be helpful. Or have it as tooltips in the editor?
> I know that Qt lacks a document framework but you get
> far more out of the box with an MFC (!), .Net or Cocoa Document-based
> project than you do with Creator's Qt Gui App.
The Qt Examples linked from the Welcome screen are meant as entry points
for more "complex" setups. I don't think it will scale well to have
project templates based on specific features (or combinations thereof).
If you feel otherwise, we could certainly discuss which set of features
you'd like to see covered by the templates directly.
> In regard to my bad or wrong comment, there is a lot of confusion
> regarding directory variables (PWD, IN_PWD etc) and dependencies. This
> leads to the impression that QMake (and by extension, Qt and Creator) is
> poor which isn't true. Some more comprehensive out of the box example
> projects would go a long way to address this.
I agree that qmake's abilities are not exactly easily discoverable.
More information about the Interest