Domanda

I am creating a project template by using Custom Wizards (say, a "Hello World" project). Aside from including my files and classes, I would like some extra stuff to be automatically added to the generated .pro file, like CONFIG+=compiler-configuration-stuff or LIBS+=extra-needed-library, but the documentation does not say anything about this. Is it possible? How?

Thanks in advance.

È stato utile?

Soluzione

You can edit .pro file in your wizard. The wizard files are in the following directory:

Qt-Dir/Tools/QtCreator/share/qtcreator/templates/wizards/

If you look at the directory there are some folders related to different wizards. For example if you look in to the "helloworld/qmake" folder, there you can see a "project.pro" file and a "wizard_sample.xml" file. You can edit the xml file to have your custom wizard.

"project.pro" is a template pro file. You can edit it and next time you create a project by that wizard, your custom pro would be created for the project.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top