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. Is there a loading widget?
Forum Updated to NodeBB v4.3 + New Features

Is there a loading widget?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.0k Views 2 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.
  • Q Offline
    Q Offline
    qwe3
    wrote on last edited by
    #1

    Hi,

    I need to widget, which will be use, when the application will be start. So this is a "loading / waiting widget". I know there is a QProgressBar, but I don't know how long will be application started. I need something like GIF, where we have loop:

    widget.png

    How can I do that?

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      It seems you are looking for QSplashScreen.

      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
      2
      • Q Offline
        Q Offline
        qwe3
        wrote on last edited by
        #3

        @SGaist Thank you, but I find something, what I'm looking for:

            QProgressBar *bar = new QProgressBar(this);
            bar->setGeometry(50,50,300,40);
            bar->setTextVisible(false);
            bar->setStyleSheet("QProgressBar::chunk {    background-color: #2196F3; width: 10px;  margin: 0.5px;}");
            bar->setMinimum(0);
            bar->setMaximum(0);
        

        Now I have exactly, what I want, but I have 2 other problems:

        1. how to change speed of move blue rectangles in this progressBar?
        2. how to change the amount of blue rectangles in progressBar? I know that I can change width in styleSheet to 20 px, but I would like to have width = 10 px, but I would like to change percent of blue rectangles to 20% in progressBar.
        Kent-DorfmanK 1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4
          1. AFAIK you can't
          2. AFAIK the number is dependent on the width of the bar and the number of steps.

          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
          1
          • Q qwe3

            @SGaist Thank you, but I find something, what I'm looking for:

                QProgressBar *bar = new QProgressBar(this);
                bar->setGeometry(50,50,300,40);
                bar->setTextVisible(false);
                bar->setStyleSheet("QProgressBar::chunk {    background-color: #2196F3; width: 10px;  margin: 0.5px;}");
                bar->setMinimum(0);
                bar->setMaximum(0);
            

            Now I have exactly, what I want, but I have 2 other problems:

            1. how to change speed of move blue rectangles in this progressBar?
            2. how to change the amount of blue rectangles in progressBar? I know that I can change width in styleSheet to 20 px, but I would like to have width = 10 px, but I would like to change percent of blue rectangles to 20% in progressBar.
            Kent-DorfmanK Offline
            Kent-DorfmanK Offline
            Kent-Dorfman
            wrote on last edited by
            #5

            @qwe3 said in Is there a loading widget?:

            how to change speed of move blue rectangles in this progressBar?
            how to change the amount of blue rectangles in progressBar? I know that I can change width in styleSheet to 20 px, but I would like to have width = 10 px, but I would like to change percent of blue rectangles to 20% in progressBar.

            If you don't like the granularity of the QProgressBar then you'll have to design a custom widget that does what you need. Looks like the granularity of progress is fixed or precacluted by the stock widget.

            If you meet the AI on the road, kill it.

            1 Reply Last reply
            0

            • Login

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