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

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).

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.

Creating Forms in Qt creator IDE

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.

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.

How to use QtWebview for Google Maps

Basically I want to use it for googlemaps but at the moment I can't even get it to compile a simple web page.
I'm using the latest version of Qt creator but the documentation just seems out of date
i have dragged the widget onto my form and set its url to google.com (just for testing purposes)
and when i hit compile i get loads of unresolved external symbol errors, I don't know what to include to use this I just assumed drag and drop the widget and I'm good to go, however this isn't the case.
Any ideas?
EDIT: For Qt 4.x, this is what you do:
Go into your .pro file and include the right module for QtWebKit.
http://qt-project.org/wiki/QtWebKit
QT += webkit
And here is an example you can find in the welcome pages of Qt Creator if you want more:
http://qt-project.org/doc/qt-4.8/webkit-fancybrowser.html
Good luck; hope that helps. And btw, I just tested it with Google Maps, and it renders fine with Qt 4.8.4 on Win 7.
EDIT: For Qt 5.x+, this is what you do:
QT += webkitwidgets
Like it shows in the .pro file of any of the examples here:
http://qt-project.org/doc/qt-5.0/qtwebkitexamples/webkitwidgets-browser-browser-pro.html
http://qt-project.org/doc/qt-5.0/qtwebkitexamples/qtwebkitexamples-index.html
And you may want to consider also adding the network module in the pro file, too.
Ok so iv seen the QT +=webkit solution all over the place which for the record doesnt work if you have just dragged a dropped a webview into a widget using qt designer.
the solution i finally found that worked was
QT+=webkitwidgets
all working now thought id answer my own question after solving it to help anyone else who might be having the same problem

Eclipse like FilteredTree for Qt?

I'm new to Qt (using Qt SDK with Qt Creator) and in the process of creating a GUI. What I'm looking for is a FilteredTree like the one found in the Preferences of Eclipse. Is there something "ready to use" out there? I've tried all search queries I can think of but no results so far.
In case it matters I'm absolutely willing to update to the newest Qt version.