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. how to create a 2D speedometer. (is there any qt example) ??

how to create a 2D speedometer. (is there any qt example) ??

Scheduled Pinned Locked Moved Unsolved General and Desktop
qpainterqt52d graphicsqt4
2 Posts 2 Posters 600 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.
  • T Offline
    T Offline
    timob256
    wrote on 28 Oct 2021, 15:59 last edited by
    #1

    how to create a 2D speedometer. As in the picture.

    I can't figure out what QPainter elements to draw them with ?????

    I think QPainter.drawPie is not very suitable for this. I am thinking of drawing my own arch (but it requires a lot of code) is there a more affordable option ??

    Screenshot_20211028_183102.png

    Screenshot_20211028_184012.png

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 28 Oct 2021, 16:01 last edited by
      #2

      Simply two QPainter::drawArc() calls with a different color.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1

      2/2

      28 Oct 2021, 16:01

      • Login

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