Qt Automotive Embedded Cluster (ICP) - qt

I am new to Qt and was curious if we can develop HMI for a Cluster(Instrument Cluster Panel) using Qt.
Can someone share a demo?
I might be in a wrong place to post this question, please don't flag.
I am looking for Examples/Demo in QT 5. (5.3.1)

Look at this widgets on Qt Apps website:
http://qt-apps.org/content/show.php/AnalogWidgets?content=87780
As you can see there are many beautiful widgets. For example:
There is also Qwt: well documented tool with a lot of different technical widgets.
http://qwt.sourceforge.net/index.html
From here

A good example is a dial-type control which combines Image elements with Rotation transforms and SpringAnimation behaviors to produce an interactive speedometer-type dial. You can find the example in the installed Qt directory in Examples/Qt-5.3/quick/customitems/dialcontrol.

Related

How to use OpenGL in QT Creator

I am working on OpenGL to create a GUI .I want to create some tabs which will help me to display different things in different windows. How is this possible using OpenGL? I read in some articles that we can use QT for that. Since I have already developed some of the GUI part in OpenGL using GLUT library ,is it possible to use the same code in QT? If so brief me how to make settings for OpenGL libraries in QT creator.
In my GUI I am trying to create a Car which is following a track.
I think you might be mixing some things up: OpenGL is a API with which you can instruct drivers to draw visual primitives, like lines, boxes, 3D triangles, pictures from buffer onto a render plane.
GLUT is a library that gives you a minimal environment around that, ie. it handles creating a window etc.
Neither of them are high-level UI description tools. Qt is really most likely what you want, as it will not only give you things like tab widgets etc, but also a feature-rich framework to do things like defining what should happen when you click a button, close a window etc.
There's a lot of examples of OpenGL usage within Qt widgets. In fact, a lot of visualization frontends use Qt and OpenGL. Qt has extensive documentation on how to generate OpenGL contextes and draw inside Qt applications.

Qt5 Double range slider

There are many postings online about trying to make a double range slider
The most common answer I found is to use libqxt. However, going to the website it clearly states it is not maintained due to internal api changes with newer versions of Qt.
Does Qt5 provide any new functionality for this, or is there a longer lasting Qt implementation that provides this functionality without requiring large external libraries?
If Qt Quick is an option, Qt Quick Controls 2 has a RangeSlider (in three different styles). The module has tech preview status in Qt 5.6, but is a proper module in 5.7.
Here's the Default style RangeSlider:
From what I have read there are only two ways to go about getting a double range slider.
Use Qt4
You can use Qt4 and download libqxt. Libqxt already has that feature implemented so it shouldn't be too hard if you know how to use Qt4.
Two sliders on top of one another
http://qt-project.org/doc/qt-4.8/widgets-codeeditor.html
^That doesn't explain how to use double sliders, but it may help you figure out ho to draw two sliders on top of each other.
You can also use that same technique to draw the colors in between the two values.

which Qt project type we should use?

New to Qt. In the official Qt tutorial, it says:
To set up a project, you first have to decide what kind of an application you want to develop: do you want a user interface based on Qt Quick or HTML5 or Qt widgets.
We plan to use Qt to do medical image display, and also use Qt to build a GUI application to control a medical device. They will be two different projects.
Which Qt project type we should use for them?
Docs say:
QWidgets are a better choice if your UI is comprised of a small number of complex and static elements, and QML is a better choice if your UI is comprised of a large number of simple and dynamic elements.
I say:
If you're going for desktop applications I'd suggest Qt Widgets, you don't have to ship the final app with libs for QML and the whole source will be written in C++ (faster, simplier so easier to debug).
QML would be a nice alternative if you want to create phone/tablet (touch experience in general).
I would argue that between Qt Quick and Qt Widgets there is no objectively right answer. In theory, one should be able to replicate any UI using either method - because at the end of the day, they are both using QtGui behind the scenes. So functionality is probably not an issue.
One thing to note is that Qt Quick (i.e., QML) is designed explicitly to make UI programming require much less code, and much less C++ knowledge. I would say it achieves this goal very well.
However, at the end of the day, I think it mostly comes down to what language your developers are already familiar with. If you have a team of C++ pro's, then I would go with Qt Widgets - if only because it's going to be very easy for them to pick up, and it's something they're already familiar with. (I'm guessing this is the case because you're already writing C++ code for your project).
If, on the other hand, your developers are already very good at QML (or, more generally, JavaScript - which QML is heavily influenced by), then I would go with Qt Quick for the same reasons.
I know of two types of Qt UI: Qt Quick and widgets.
Widgets behave like most other UI toolkits out there, you have a GUI editor and a tree of UI objects. They are pretty mature and look like most standard UIs.
Qt Quick is the newer Qt UI toolkit. It uses a domain specific declarative language (QML) to specify the user interface and JavaScript for interactions. There are also plans to offer Qt widgets inside the Qt Quick framework, but I'm not sure how far that project has gotten. Qt Quick is meant to deliver more dynamic / custom user interfaces.
As far as I know Qt will continue to support both approaches in the foreseeable future so which one you pick depends on your use-case.

Qt+OpenGl+SimpleGl

I have enabled qt+OpenGl+SimpleGl on one of the ARM platform and was able to run opengl example programs.
I also has a qt+Webkit, which is working with a graphic plugin.
I wanted to use simpleGl context for every thing, instead of using the normal graphic screen. So, when I try to run Qt+Webkit with simpleGl, I just get a blank screen.
Does QT support this? If so how can we make it?
Yes, this is correct. OpenGL draws directly to the framebuffer. The simplegl driver doesn't handle what is drawn using the raster paint engine of the QWS, so you may see only black.
Using simplegl for "everything" means you want everything to be drawn using OpenGL in your EGL full-screen window? This is possible under some assumptions. You have to write all your applications to be rendered using the Qt OpenGL paint engine (using the opengl graphics system is not supported under Qt/E). This is possible also for QtWebKit, I'm doing it now. Note that this does not mean that everything is rendered using hardware acceleration. You'll have to write your applications "the right way" to get all actually hardware accelerated. Consider that you'll have to handle the mouse pointer some other way in this case.
The other way is to just modify the simplegl driver to allow for the use of Qt applications using the raster paint engine. This is possible as well with some limitations. Qt can use blit to place its own windows over OpenGL. Look for the framebuffer driver inside the Qt source tree to know how to do this. You can then have common Qt applications and OpenGL Qt applications some way. I'm doing this as well. Not everything can be done anyway.
EDIT: I'm sure you already did, but in case, give this http://doc.qt.io/qt-4.8/qt-embeddedlinux-opengl.html much attention.
Unfortunately I don't know anything about SimpleGL, but I do know that there is a way to render a standard Qt widget in a QGLWidget. Maybe have a look at this Qt Quarterly which I think is somewhat related to your question:
http://doc.qt.nokia.com/qq/qq26-openglcanvas.html

qt/wxwidgets third party components?

I'm used to working in a Delphi and C# environment which seem to have a rich set of third party components available. I'm currently wanting to do cross-platform programming in C++ using either qt or wxwidgets. Is there a large market for third party components? I was looking at sourceforge and that doesn't seem to show much that is useful (how the hell do you find out what components or features are in a project without downloading the source?). I'm thinking carousel/coverflow components, rich datagrids (like the sort DevExpress provide). Or is this, write your own territory?
There are a number of good quality third party Qt libraries, though I don't know of a centralized resource for finding them.
A few places to start looking:
http://www.ics.com/products/qt/addons
ICS provides the
QicsTable, a high performance
model-view-delegate table library,
and resells various libraries by
KDAB. (These are all available as a
free download.)
http://www.qtcentre.org/contest-first-edition/finalists
QtCentre has an annual
programming contest which awards
interesting Qt-based tools and
libraries. This year's contest is
still being judged, but the
finalists from last year can be seen
at the above link. Check out the
Custom Widget and Helper Library
categories.
There is a third-party component for Qt - advanced data grid - Qtitan DataGrid.
In it there are almost all necessary possibilities.
Ultra-fast processing of large data sets
Use of QStyle for rendering objects ensures that the grid blends into the UI design of any application
Two modes of vertical scrolling
Customizable colors of rows and columns
Two integrated table views
Column banding and grouping
Automatic width and height adjustment
Fixed columns
Flexible sorting
Column summaries
Integrated high-performance caching mechanism
Advanced paint engine for faster rendering of UI elements
Cross-platform support
API for external editors
Screenshots about this Grid
http://www.devmachines.com/qtitan_screenshots.php
For a crossplatform GUI development, Qt is the tool you should be looking for. I have used both. Here is what I feel about Qt
Building rich GUI is a piece of cake if you use Qt. It has a loads of GUI capabilities, starting with its Graphics View, OpenGL support, stylesheets that supports css. A mature painting system, Richtext formatting, Integration with Webkit, and I am sure I am missing a lot more here...
Qt has its own build system, qmake which creates platform dependent Makefiles, so no Makefile hassles. Moreover you get a single pro-file which is much easier to manage. For wxWidgets, you will need to create different Makefiles for the various compilers you intent to use.
Other advantages of using Qt over wxWidgets are - the Api is very easy to learn with its intuitive api, superb documentation and tons and tons of examples. This helps you get yourself productive pretty soon and thus getting your product early to marker. BTW Qt is a RAD tool. Moreover, there is a huge user base, and there are forums like QtCentre.org to help you with your questions.
If you are planning to buy commercial license, you get support directly from Qt Software (trolltech).
You would obviously be using Qt's Model View pattern, allowing you to separate your business logic from the presentation tier. I would suggest that you write to "support at trolltech dot com" or "sales at trolltech dot com" to get more information. You can explain your requirements and they would be able to explain how Qt fits your needs.
You could also download the opensource version and have look at the demos.
Coverflow: http://labs.trolltech.com/blogs/2007/11/02/pictureflow-on-windows-mobile/ , http://ariya.blogspot.com/2008/03/introducing-photoflow.html
As I said, if its Rich gui you are planning to develop, use Qt.
In addition to the ones by ICS and at QtCentre the Qt-apps website has some open source widgets/components for Qt.
For wxWidgets you have wxCode which has quite a few things although not all the existing third party components (including a few very useful ones) are available from there.
Good quality components for Qt can be found here - http://www.devmachines.com/
At the moment there are Microsoft Ribbon Control for Qt, DataGrid for Qt, Charting for Qt.
All components are commercial and should be used in Qt Commercial or Qt LGPL.

Resources