Creating Forms in Qt creator IDE - c++

For many projects (like this) I need to create a Form using the Qt creator IDE and then work on that Form.
I use the Qt creator 3.6.0 which is the latest Qt IDE.
There I have File -> New File or Project and the templates are just like the page below:
http://www.4shared.com/download/AM4KhauNba/Capture__2_.PNG?sbsr=7242
But the tutorial says that I need to create a Form (!) and sometimes, using one of the MainWindow templates. But I have only All Templates and Desktop Templates (top-right corner of the screenshot).
If I cannot create that Form, I then will not be able to do the tutorial's instructions.
This may be the problem of any other beginner of Qt, that uses the new Qt creator IDE.
Would anybody help please?

I just found the answer. I hope this helps other new beginners as well. :-)
I should select from the menu: File > New File or Project ...
This will produce a dialog like this one:
I must choose Qt and Qt Designer Form, click on the Choose ... button and then follow the wizard.

Related

Add GUI to a QT Project with Arduino

So here is my question I have been trying to create a small "software" which would control my arduino card. For this I decide to use qt so I used this tutorial to add arduino to qt :
http://www.lucidarme.me/?p=3287
I am very sorry the page is only in French. I basicly get 3 files config files and includes for my arduino. And a Makefile. The problem I have is that I want to add GUI such as Windows but whenever I add a gui file to my project it says it cannot find the "QMainWindow". However I think the problem is deeper and that it doesn't find any Qt class.
I think this is because I don't have any pro files but I tried adding one and it didn't work. I hope you guys understood my problem I am very new to QT ...
Thank you !
The GUI project is completely unrelated to anything Arduino. The page you linked to shows how to use Qt Creator as an IDE to work on Arduino projects, as a replacement to the Arduino IDE. This has nothing to do with GUIs or Qt, you'd be reusing Qt Creator as a general-purpose IDE that it is.
What you need and want is to create a standard Qt project in Qt Creator and go from there. You can also leverage Qt to "simulate" Arduino code without running real Arduino hardware, see this answer for an example.

Export Qt Designer window to Qt Creator

I am working on a project on Qt, and I'm a total noob, so I don't know how to bind my Qt Creator code and my QT Designer window.
I almost finished my code, so I began drawing my windows with qt designer.
Then I simply saved as .ui file, but whenever I try to go to a slot (in this case clicked() from a button) I get the error that the header file associated with the window does not exist.
How do I properly import my designed window?
Thank you very much
ANy help will be appreciated
As commented by #peppe, the best way is to go with Qt Creator from the start. You can copy/paste your designs if made on Qt Designer.
On Qt Creator go to
File > New File > Qt > Qt Designer Class and it will automatically generate the code.

Qt Console Application missing in New Project wizard in Qt Creator

For some reason the Qt Console Application entry is missing from the New Project wizard in my Qt Creator 3.3.0.
How it looks on my computer:
How it should look normally:
Any idea why it's missing and how to bring it back?
It turned out that it was because I had selected Android Templates in the combo at the top-right. I hadn't noticed that Combo at all and I have no idea how it got that way.
Changing it to All Templates fixed the problem.

What's kind of widget is the toolbox in qtdesigner?

I mean widget from which widgets could be transfered to form.
I want make up some widget like that one. Maybe there already is some open source solutions in web. It would be great.
The Sourcecode for Qt is open and freely available; Qt Designer is part of that. So just have a look into:
the Qt Designer sub-directory of the Qt project, in particular:
the WidgetBox component of Qt Designer.
as successor to Designer, look at Qt Creator (and its Designer Component...)
Also suggest to subscribe to Qt mailing lists and post such questions there; you'll find people pretty happy to explain how Qt Designer works / what it does / how it can be enhanced and/or its components integrated elsewhere (like, say, what the difference between the Qt Designer from the Qt sources and the "Designer" component of Qt Creator is).

using qt creator only as editor: are qt libraries necessary

I want to use qt creator, only as an editor, which does code completion and finds declarations etc. I dont want to use it to build etc. Is there a way, I can circumvent the need of qt-libraries? I am using a server, where my file space is limited. Also, without qt libraries, it does not allow making even a project. When I tried to install qt-libraries, it configures fine, but on make gives error.
So, can you suggest an alternative? Thanks
No, you need the Qt libs because the editor was coded in Qt.
Actually - at least under Windows -, you can. You just have to deselect all Qt library versions and only select the editor. If you want to have a debugger available on Windows, also select the checkbox for CDB support.
I have forgotten how this works with the Linux installer, but I imagine the same applies there as well, except of course for the CDB debugger, which is not available on Linux. Instead you should be able to chose from GDB and some other alternatives, though it might not be during the installation.
Once you installed it and are about to set up a new "Plain C++" project, you can't select a Qt version when creating a new kit, obviously.
If you blindly selected an already existing kit, Qt Creator might have tried to use a Qt installation for your vanilla C++ project. Instead of doing so, you should click the "Manage..." button on one of your preexisting kits and add a new, custom kit. Here you can set the "Qt version" option to "None". The rest should be set according to your needs.