QT Progress bar in console application - C++
-
wrote on 23 Feb 2021, 18:55 last edited by Nanda1605
Hi,
I am using QT console application to start the program using main.cpp and having UI (main.qml). I want to add the progress bar in main.qml so i added the progress bar available from the design panel under QT Quick - Controls 2. This progress bar was not the same as in QT widgets Application.
I want to use the one in QT widgets Application. How can i bring that up in console application? -
Hi,
Are you trying to show that progress bar "within" the command prompt ?
-
wrote on 23 Feb 2021, 20:41 last edited by
Hi,
Program will be started from command prompt by passing argument and then in UI window will be displayed where i need the progress bar -
Then nothing stops you from using QProgressBar. However if you want to integrate it with QtQuick that might be a different issue. What exactly are you after ?
-
Then nothing stops you from using QProgressBar. However if you want to integrate it with QtQuick that might be a different issue. What exactly are you after ?
wrote on 23 Feb 2021, 21:50 last edited by@SGaist When i drag and drop from the design panel , i could see ProgressBar was added in Main.qml but it was not as expected like in Qwidgets.
I like to have as in below pic
As like i mentioned in the topic this progress bar is from widget application, my applicaiton was console and the progress bar looks like below
-
@SGaist When i drag and drop from the design panel , i could see ProgressBar was added in Main.qml but it was not as expected like in Qwidgets.
I like to have as in below pic
As like i mentioned in the topic this progress bar is from widget application, my applicaiton was console and the progress bar looks like below
@Nanda1605 QWidgets and QML do have different styles. I'm not sure if you can simply change the style of the QML progress bar to fit the QWidget one.
BUT, nothing is stopping you from customizing your QML progress bar to your liking
https://doc.qt.io/qt-5/qtquickcontrols2-customize.html#customizing-progressbar
1/6