Results 1 to 4 of 4

Thread: create non continuous vertical bar

  1. #1
    Join Date
    Mar 2011
    Posts
    120
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default create non continuous vertical bar

    Hi everyone,
    I want to show fingerprint matching score in a non continuous vertical bar.I am also able to change the colour of the bar (can contain multiple colour).
    Is there any predefine class present in qt or i have to create it ?
    can any one give any example related to it ?
    thanks

  2. #2
    Join Date
    Mar 2011
    Posts
    120
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: create non continuous vertical bar

    Can i use QProgressBar for this things ?

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,734
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: create non continuous vertical bar

    You can make horizontal or vertical progress bars with QProgressBar (it's the first line of the docs). Use QProgressBar::setOrientation().

    You can style the bar colour and whether the bar is solid or broken into segments (is that what you mean by "non continuous"?) with style sheets. The "Qt Style Sheets Reference" (look for it in Qt Assistant) contains links to an example.
    Last edited by ChrisW67; 9th May 2011 at 09:17.

  4. #4
    Join Date
    Mar 2011
    Posts
    120
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: create non continuous vertical bar

    Now it is working.
    My style sheet is
    Qt Code:
    1. border: 0px solid black;
    2. text-align: top;
    3. padding: 1px;
    4. border-top-left-radius: 7px;
    5. border-bottom-left-radius: 7px;
    6. background: QLinearGradient( x1: 0, y1: 0, x2: 0, y2: 1,
    7. stop: 0 gray,
    8.  
    9. stop: 1 gray );
    10. width: 15px;
    11. }
    12. QProgressBar::chunk {
    13.  
    14. border-top-left-radius: 7px;
    15. border-bottom-left-radius: 7px;
    16. border: 1px solid black;
    17. height:10px;
    18. margin:0.5px
    19. }
    To copy to clipboard, switch view to plain text mode 


    Now i want to give colour green to red from top to bottom .
    How i will set colour to each chunk ?
    Last edited by bibhukalyana; 9th May 2011 at 12:35. Reason: updated contents

Similar Threads

  1. Replies: 0
    Last Post: 9th April 2011, 13:15
  2. Continuous Printing
    By Prabha in forum General Discussion
    Replies: 0
    Last Post: 28th July 2010, 11:01
  3. Replies: 1
    Last Post: 13th December 2009, 02:34
  4. Continuous read of text from an input file
    By ttvo in forum Qt Programming
    Replies: 1
    Last Post: 2nd June 2009, 00:09
  5. Replies: 4
    Last Post: 1st May 2009, 11:00

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.