[Qt-creator] Adding examples to welcome page
Ziller Eike
Eike.Ziller at digia.com
Wed Nov 21 09:53:40 CET 2012
> ________________________________________
> From: qt-creator-bounces+eike.ziller=digia.com at qt-project.org [qt-creator-bounces+eike.ziller=digia.com at qt-project.org] on behalf of Kevin Krammer [kevin.krammer at kdab.com]
> Sent: 20 November 2012 12:36
> To: qt-creator at qt-project.org
> Subject: [Qt-creator] Adding examples to welcome page
>
> Hi,
>
> I am researching on how to best add new examples to creator's example section
> (reachable via the welcome screen).
>
> The examples seem to come from src/plugins/qtsupport/exampleslistmodel.cpp,
> ExamplesListModel::exampleSources()
>
> I am mostly interested in adding examples from a local Qt5 build (the Qt4
> examples are installed by the package manager and already available).
There is no "manifest" file that describes the examples in Qt 5 yet, and that
Qt Creator needs to show you the examples.
https://bugreports.qt-project.org/browse/QTBUG-27801
> The code seems to be have the capability to check for any additional Qt's
> examples but it also has this
>
> // There is no good solution for Qt 5 yet
> if (version->qtVersion().majorVersion != 4)
> continue;
That is fixed in 2.6 & master:
http://qt.gitorious.org/qt-creator/qt-creator/blobs/2.6/src/plugins/qtsupport/exampleslistmodel.cpp#line303
> Can anyone shed a light on what "no good solution" means in this context?
> Any other way (config setting, environment variable)?
As it is, you cannot "add" examples, the code basically randomly takes a registered Qt version that has some.
You can force Qt Creator to take a specific example manifest by putting a ExampleManifests entry
in your settings:
http://qt-project.org/wiki/Building-Qt-Creator-Packages
Br, Eike
> Cheers,
> Kevin
>
> --
> ** Qt Developer Conference: http://qtconference.kdab.com/ **
>
> Kevin Krammer | kevin.krammer at kdab.com | Software Engineer
> Klarälvdalens Datakonsult AB, a KDAB Group company
> Tel. Sweden (HQ) +46-563-540090, USA +1-866-777-KDAB(5322)
> KDAB - Qt Experts - Platform-independent software solutions
More information about the Qt-creator
mailing list