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. Not able to view progressbar

Not able to view progressbar

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.9k Views
  • 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.
  • S Offline
    S Offline
    shankarraj
    wrote on last edited by
    #1

    My parent widget is having Qt::FramelessWindowHint as windows flags. In this widget: I display logo in full screen[image set to a label control].Logo is displays with black background.I have a progressbar which is set with following stylesheet:
    @
    QString("QProgressBar { border: 1px solid green; background: red; padding: 1px; text-align: left ; } ") +
    QString("QProgressBar::chunk:horizontal { background: qlineargradient(x1: 0, y1: 0.5, x2: 1, y2: 0.5, stop: 0 red, stop: 1 yellow); } ") +
    QString("QProgressBar::chunk:indeterminate { background: qlineargradient(x1: 0, y1: 0.5, x2: 1, y2: 0.5, stop: 0 red, stop: 1 yellow); }"));
    @
    Also: I set windows flags to progressbar as progressBar->setWindowFlags(Qt::WindowStaysOnTopHint);

    But I am not able to view the progressbar in the widget when I run the program. Can somebody help.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rahul Das
      wrote on last edited by
      #2

      can't make out from the style sheet alone. After all, style sheet just tells us how it should look like when it is shown.

      You could use @ tags so that , your code will be readable.


      Declaration of (Platform) independence.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        shankarraj
        wrote on last edited by
        #3

        I did not set any windows flags to my main widget. I have initially one label which covers entire widget[it has same width & height as main widget].That label contains logo. I will have to show progressbar in the middle of the widget. When I execute the program: I am able to view the logo. But progressbar is not shown. Can somebody assist to resolve this issue.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Rahul Das
          wrote on last edited by
          #4

          The tags i meant is about posting your code in the forum. like this:

          @QString(“QProgressBar { border: 1px solid green; background: red; padding: 1px; text-align: left ;} “)@

          Okay, you have a Main Window, inside one full screen label too. Above this, about the center one progress bar which is not visible.

          May be it is hidden , and have you tried "QWidget::raise ()":http://developer.qt.nokia.com/doc/qt-4.8/qwidget.html#raise

          Alternately you can use [[doc:QProgressDialog]] too


          Declaration of (Platform) independence.

          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