Progress Step Indicator in QML - qt

I am starting a project in QT with QML and I need to build a progress indicator to show the steps of a process. I wish to do something like the image in that link: https://dribbble.com/shots/10261597-Progress-Indicator
I coundn't found nothing in the documentation about that, what is the best way to achieve that?

Related

Treeview for FileSystem with checkboxes in qt

We need a tree view with File system and check boxes in QT. Is there any way to achieve that?
The tree we need would look something like below:
UPDATE:
I am able to achieve it with subclass of QFileSystemModel. Still have few challenges, but at least subclass is working. Below is the code if anyone needs it. Below is the link to the code -
https://drive.google.com/file/d/1qViZ3iEW2pV2th0jQhzneDL14SEhIgS0/view?usp=sharing
The pending work is to apply a wait cursor (or make treeview uneditable when the check/uncheck is taking place).
PS: It will take a lot of time if root node is checked.
Well, all of that can be achieved with minimal customizations of built-in classes, actually those checkboxes is almost the only thing that has to be done yourself.
QFileSystemModel already provides a proper model for displaying the current filesystem contents, it can be subclassed
As for QML, the best demo is already provided by Qt, check the File System Browser Example. This example uses some deprecaded Qt functionality, but still it shows the basic concept.
The modern techniqes can be also found in the answers to the following question: Qt File Browser based on QML
Hopefully, all that helps you, good luck!

Is it possible to create a Qt customer widget *in* designer *for* designer?

I have found a really neat custom widget for Qt and managed to incorporate it into Qt Designer. I would now like to create a customer widget in designer by placing 32 of these LEDs into a new widget in Designer, then add some functions to it such as giving it address and passing data into it that will then illuminate patterns in colours according to the passed data.
My questions are:
Can I do this? I have placed 32 LEDs on to a new QFrame widget in designer and named the LEDs 0-31, but am at a loss as to know what to do next.
Is there a tutorial anywhere for this? I have found loads of hits on google for creating custom widgets for designer, but not using designer.
Please bear in mind I am not a good Qt programmer, I write embedded code for micros in C and am really not good at object orientated code; I can just hack together relatively simple programs for test and measurement. I need something that will hand hold me through this.
http://doc.qt.io/qt-5/qtdesigner-worldtimeclockplugin-example.html
This seemed to be the kind of thing I wanted, it seemed to look like someone has placed widgets on a screen to create a new widget, but it seems to keep referring back to Creator.
Maybe I am trying to do something impossible. Maybe I have to place this new LED in creator with code?
Many thanks for any pointers.
Yes, it is. A Designer plugin basically consists of 2 Parts:
The Widget that you want to add to the designer
The plugin itself that provides information about the widget usw.
You can simply create the widget with the designer, add the QDESIGNER_WIDGET_EXPORT macro and thats it. Create your designer plugin to load this widget and it should work.
Note: Since you mentioned your not very experienced, you should try to follow the Custom Widget Plugin Example. Once you understood that one, it's only a small step to your designed plugin.

Qt: How to implement a class for an image with properties

I have dared to start learning Qt with very basic C++ knowledge. I am asked to implement a class for image in Qt.
In my application whenever I will select a picture it will have some properties, such as, when I will move the window the QLabel that is containing my image will also increase in size of width and height without loosing the aspect ratio.
I do not expect some finished code. But I want to know how to think for that. I am having problem to make an algorithm.
I am expecting some help to solve this problem. Thanks in advance!
You should begin by running some sample code and seeing how they work. There are lots of examples that display images in various ways. Step through them to see if you can understand what each step does.
Try to write a simple "Hello world!" app in Qt. Then try adding an image display to it. The solution to the task you describe should become straightforward as you develop knowledge of Qt.

How do I generate documentation screenshots for a Qt application?

Without manual intervention I would like to generate screenshots of a Qt desktop application. The screenshots should be generated when the make documentation make target is being issued. So in the source tree there are no PNG files containing screenshots but instead there are automated instructions of how to produce them.
An advantage of generating the screenshots would be that the documentation would always stay accurate. It would cope with the problem that the visual appearance of Qt widgets might change over time. Another advantage would be that screenshots for different Qt styles could be created. A Qt style is chosen by using
QApplication::setStyle() or by starting the app with the -style command line option.
I guess there are be two approaches of how to achieve my goal.
Record all mouse events and key strokes that are needed to bring the application
into the state where the screenshot is being taken.
Make the Qt application scriptable, and write a script that brings the application into the state where the screenshot is being taken
Is there any third-party software that could automate the first approach?
Should I use QtScript for the second approach? Are there other ways of how to accomplish my goal? Are there any open source Qt applications that generate their documentation screenshots in their build system?

continuous line drawing in QT

I need to draw line continuously on the screen, output should be as it is in the video. Please check this link: http://www.youtube.com/watch?v=sYNIm210mJY.
Please suggest me which is the best method to implement it.
Please check the scribble example (located in Qt examples/widgets/scribble/) provided by Qt.
You'll find everything you need to get what you want !

Resources