JSON-Based Wizard for Qt Creator - Clarification needed!
I wanted to write my first JSON-based Wizard for Qt but I am afraid I lost track of the process already at step number 2. The tutorial seems to be pretty straight forward, so I guess that I am missing something or just too dumb to get it :D
Let me copy-paste the first two steps of the tutorial:
"To create a JSON-based C++ class wizard:
- Make a copy of share/qtcreator/templates/wizards/classes/cpp and rename it.
- Right-click the project name in Projects view and select Run qmake from the context menu to register the new wizard. Basically, qmake generates a fixed list of files to copy. Therefore, you need to run qmake each time the names or locations of the files change."
So the first step is clear. Now the second: "right-click the project name in Projects view..." which project is it referring to? Any project I may happen to have opened? Or do I have to declare somehow my new wizard as a project? furthermore, which files is it referring to, the ones within the new, copied directory?
I intend to create a wizard to automate the setup of Qt and Platformio for micro-controller development. Involves setting up new build and clean steps, as well as creating the platformio.ini file.
I have the same questions and am fact am working with the Teensy 3.2 micro-controller unit. II copied the cpp non-qt project directory and with an editor changed the name, and ID, description but left everything else the same. QT won't see it when I start QT. I opened it as a project (open project/file), right clicked on the project name and selected run qmake. I then restarted QT and the project does not show up. I have an xml wizard for the adruino system and it wil show up but not a json one. I've listened to Tobias's video but it just talked about the new json and not how to actually make them work. There isn't much out there and as we found out the QT doc is not very helpful. I would think you create the wizard.json file and any others needed in the wizard's folder and when you restart QT it would find the folder and read it.
Hopefully someone will tell us what we are missing.
I finally got one to work. I'm not really sure how or why but I modified the wizard.json to change description, display name, and id. I opened it in Qtcreator, did the run make thing but still didn't work. I came back to it after replying to this and to a person at the Qt Company about the documentation and now it works. I've change the category so I now have a Teensy Microcontrollers under projects (left column), and the display name in the middle, and the description. I haven't changed any of the options, pages, or genertors yet.
I foundout that if I remove the supported project types line the project will not show up. I have no idea what this does but it's got a list of stuff.
"supportedProjectTypes": [ "CMakeProjectManager.CMakeProject", "Qbs.QbsProject", "Qt4ProjectManager.Qt4Project" ],
This evidently replaces the kind in the xml wizard. It has to be there but can be empty as in
"supportedProjectTypes" : [""]
I simply put "project: in and it seemed happy.
Thanks @RangerQT for your input!
I followed the steps...well, first step, once again but on a different computer and it worked as it should, so it might have something to do with the computer on which I tried it.
More on this to come.
That's good news. I found someone else having and issue and a Qt Company person directed them to the docs and said let them know if the docs did not cover it. The employee had their email in the post so I emailed them and they will be reading the posts including this one and will talk to Tobias to make it clearer. I let them know about the supportedProjectTypes also as I did not have that info when I emailed them. Hopefully the docs will be updated!