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. Seeking inspiration for direction orientation.
Forum Updated to NodeBB v4.3 + New Features

Seeking inspiration for direction orientation.

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

    Good day everyone,

    After months of exploring Qt, I decided to refine my Design through Qt Widgets (Not QML). I would like to create something similar as shown below (Not sure what this is called but seems to be for direction orientation). I got the photo from google under search name ship conning display.

    As far as to replicate it, Qt only provide bar widget. But how about the curve such as shown?

    0_1537850284331_seeking inspiration 2.JPG

    Another similar direction orientation is from a game "Rules of survival". How do I make such bar to be interactive (Moving left and right upon movement along with the numbers )? Can Qt Widget replicate the 2 followings examples?

    0_1537850601855_seeking inspiration.JPG

    Thank you and lets hope to have a great discussion.

    J.HilkJ raven-worxR 2 Replies Last reply
    0
    • F Faruq

      Good day everyone,

      After months of exploring Qt, I decided to refine my Design through Qt Widgets (Not QML). I would like to create something similar as shown below (Not sure what this is called but seems to be for direction orientation). I got the photo from google under search name ship conning display.

      As far as to replicate it, Qt only provide bar widget. But how about the curve such as shown?

      0_1537850284331_seeking inspiration 2.JPG

      Another similar direction orientation is from a game "Rules of survival". How do I make such bar to be interactive (Moving left and right upon movement along with the numbers )? Can Qt Widget replicate the 2 followings examples?

      0_1537850601855_seeking inspiration.JPG

      Thank you and lets hope to have a great discussion.

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      hi @Faruq

      to answer your question, there is, in principle, nothing in QWidgets that would prevent you from creating the 2 examples.

      But, the fancier the ui, so more difficult and complex its going to be.

      The first example, I would simply print as a Image to the background, and using an overwritten paintEvent to draw the green&curved reactangle according to some value(position)

      The 2nd example, seems like a tumbler-esk item. There's no native QWidget for that. You would have to create your own or search the internet/github :-)


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      4
      • F Faruq

        Good day everyone,

        After months of exploring Qt, I decided to refine my Design through Qt Widgets (Not QML). I would like to create something similar as shown below (Not sure what this is called but seems to be for direction orientation). I got the photo from google under search name ship conning display.

        As far as to replicate it, Qt only provide bar widget. But how about the curve such as shown?

        0_1537850284331_seeking inspiration 2.JPG

        Another similar direction orientation is from a game "Rules of survival". How do I make such bar to be interactive (Moving left and right upon movement along with the numbers )? Can Qt Widget replicate the 2 followings examples?

        0_1537850601855_seeking inspiration.JPG

        Thank you and lets hope to have a great discussion.

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by
        #3

        @Faruq
        QML (using Canvas element) and QtQWidgets (using QPainter in combination with QPainterPath) is capable of drawing such things.
        In either way it's all about the math and doing the calculations of each shape (arcs, lines, texts, ...)
        The bottom image is rather easy. Yyou just need to calculate the translation along the x-axis based on your input values which make up the direction.

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        2

        • Login

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