Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT Progress bar in console application - C++
Forum Updated to NodeBB v4.3 + New Features

QT Progress bar in console application - C++

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 693 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nanda1605
    wrote on 23 Feb 2021, 18:55 last edited by Nanda1605
    #1

    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?

    in QT widgets
    58028176-d3ef-4467-b374-0960d84747ff-image.png

    in QT console
    d8c1496f-baa2-4274-ab5a-52e759d44f92-image.png

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 23 Feb 2021, 19:00 last edited by
      #2

      Hi,

      Are you trying to show that progress bar "within" the command prompt ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • N Offline
        N Offline
        Nanda1605
        wrote on 23 Feb 2021, 20:41 last edited by
        #3

        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

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 23 Feb 2021, 20:46 last edited by
          #4

          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 ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          N 1 Reply Last reply 23 Feb 2021, 21:50
          0
          • S SGaist
            23 Feb 2021, 20:46

            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 ?

            N Offline
            N Offline
            Nanda1605
            wrote on 23 Feb 2021, 21:50 last edited by
            #5

            @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

            950a06a9-2a48-41cf-b0b8-f6a810d536f5-image.png

            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

            580488a7-838b-4fa1-9d45-71d8635337e0-image.png

            J 1 Reply Last reply 24 Feb 2021, 08:01
            0
            • N Nanda1605
              23 Feb 2021, 21:50

              @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

              950a06a9-2a48-41cf-b0b8-f6a810d536f5-image.png

              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

              580488a7-838b-4fa1-9d45-71d8635337e0-image.png

              J Offline
              J Offline
              J.Hilk
              Moderators
              wrote on 24 Feb 2021, 08:01 last edited by
              #6

              @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


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              1 Reply Last reply
              2

              5/6

              23 Feb 2021, 21:50

              • Login

              • Login or register to search.
              5 out of 6
              • First post
                5/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved