Results 1 to 6 of 6

Thread: What the widgets I have to use to create application like on the added photo

  1. #1
    Join Date
    Aug 2017
    Posts
    3
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default What the widgets I have to use to create application like on the added photo

    quntity of rectangles will change and colour will depend on temperature from sensors

    42029995bf36e9f50f882e4cda11fb3d8e66b211.jpg

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: What the widgets I have to use to create application like on the added photo

    You can use QProgressBar for all of the rectangles, I think. You could also look on the inqlude and linux-apps web sites for libraries that contain similar widgets.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Aug 2017
    Posts
    3
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: What the widgets I have to use to create application like on the added photo

    maybe not good example, my rectangle have to be full painted not level or part, change colour only

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: What the widgets I have to use to create application like on the added photo

    You can still use QProgressBar, just set the value to 100% of the range. If all you want is a plain rectangle with different background color, then you can use a QWidget and simply change the QPalette Window color role to the color you want.

    If you don't want something like the picture you posted, then what *do* you want? Why post a picture of something that is different from what you want, and then ask us how to make something that looks like the picture? You waste our time.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  5. The following user says thank you to d_stranz for this useful post:

    Vadym (22nd August 2017)

  6. #5
    Join Date
    Aug 2017
    Posts
    3
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: What the widgets I have to use to create application like on the added photo

    I have an idea to use scrolArea then insert QWidgets and in every QWidget paint (using QPainter) rectangle or polygon even .
    but I do not know how to write code to paint figure in separate QWidget.....will be good it or not ? sorry for maybe stupid questions but I new in qt, sthanks

  7. #6
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: What the widgets I have to use to create application like on the added photo

    Your Qt distribution comes with a huge set of example programs, including many on painting widgets. Why don't you study those and understand how it works before trying to do something yourself?
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 1
    Last Post: 7th February 2014, 14:57
  2. Replies: 2
    Last Post: 30th January 2013, 05:02
  3. Replies: 2
    Last Post: 13th September 2011, 02:54
  4. Replies: 6
    Last Post: 1st September 2010, 16:11
  5. Replies: 1
    Last Post: 20th July 2008, 19:47

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.