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 do I Build this Widget for Automotive Application in GUI
Forum Updated to NodeBB v4.3 + New Features

How do I Build this Widget for Automotive Application in GUI

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 5 Posters 1.1k 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.
  • M Offline
    M Offline
    Murari G
    wrote on last edited by
    #1

    Car-dashboard.jpg )

    Pl45m4P 1 Reply Last reply
    0
    • M Murari G

      Car-dashboard.jpg )

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @Murari-G

      It's a 4-way button with some sort of display in the middle, right?!
      You could use single components and design a composed widget or you paint everything yourself using a custom widget and its paintEvent

      Edit:

      A custom widget acting like two spinBoxes together (thinking kinda abstract) might also work, since you have increase/decrease functions on X- and Y-axis (temperature and fan speed)

      Btw: QML or QtWidget? And have you looked if there's something similar around yet?


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      M 1 Reply Last reply
      0
      • Pl45m4P Pl45m4

        @Murari-G

        It's a 4-way button with some sort of display in the middle, right?!
        You could use single components and design a composed widget or you paint everything yourself using a custom widget and its paintEvent

        Edit:

        A custom widget acting like two spinBoxes together (thinking kinda abstract) might also work, since you have increase/decrease functions on X- and Y-axis (temperature and fan speed)

        Btw: QML or QtWidget? And have you looked if there's something similar around yet?

        M Offline
        M Offline
        Murari G
        wrote on last edited by
        #3

        @Pl45m4 Thanks for the Response. I have searched to implement this functionality but I couldn't find anything could you please me help me with this ?

        Pl45m4P 1 Reply Last reply
        0
        • M Murari G

          @Pl45m4 Thanks for the Response. I have searched to implement this functionality but I couldn't find anything could you please me help me with this ?

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by
          #4

          @Murari-G said in How do I Build this Widget for Automotive Application in GUI:

          could you please me help me with this ?

          What do you have so far? You didnt say what language you are using and if QtWidgets or QML.


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          M 1 Reply Last reply
          0
          • Pl45m4P Pl45m4

            @Murari-G said in How do I Build this Widget for Automotive Application in GUI:

            could you please me help me with this ?

            What do you have so far? You didnt say what language you are using and if QtWidgets or QML.

            M Offline
            M Offline
            Murari G
            wrote on last edited by
            #5

            @Pl45m4 QtWidgets

            KenAppleby 0K 1 Reply Last reply
            0
            • S Offline
              S Offline
              SamiV123
              wrote on last edited by
              #6

              With Qt widgets you can make a new custom QWidget and do the paint yourself, ask your graphics team to provide you pre-rendered button background image + graphics do a few simple QPainter draw operations to blit the background image and button icons and the text.

              Other possible solution is to create some custom GLSL shaders with GL paointer.

              1 Reply Last reply
              0
              • M Murari G

                @Pl45m4 QtWidgets

                KenAppleby 0K Offline
                KenAppleby 0K Offline
                KenAppleby 0
                wrote on last edited by
                #7

                @Murari-G

                Use some creativity and basic software engineering principles.

                You could start by subclassing QWidget and overriding

                void paintEvent(QPaintEvent * e);
                

                and also

                void mousePressEvent(QMouseEvent *);
                void mouseMoveEvent(QMouseEvent *);
                void mouseReleaseEvent(QMouseEvent *);
                

                then implementing the graphics and functional behaviour you wish to see and support.
                This at least means using classes like QPainter, QBrush, QPen, QTransform, QImage, QPixmap, and maybe QRegion.

                QTimer, QVariantAnimation will assist with the look and feel of the result.
                You presumably have some underlying model that the UI interacts with, so use signals and slots for that.

                There is probably more than just this one widget in the dashboard, if so structure your graphical widgets hierarchically where common functionality is provided by base classes.

                M 1 Reply Last reply
                1
                • KenAppleby 0K KenAppleby 0

                  @Murari-G

                  Use some creativity and basic software engineering principles.

                  You could start by subclassing QWidget and overriding

                  void paintEvent(QPaintEvent * e);
                  

                  and also

                  void mousePressEvent(QMouseEvent *);
                  void mouseMoveEvent(QMouseEvent *);
                  void mouseReleaseEvent(QMouseEvent *);
                  

                  then implementing the graphics and functional behaviour you wish to see and support.
                  This at least means using classes like QPainter, QBrush, QPen, QTransform, QImage, QPixmap, and maybe QRegion.

                  QTimer, QVariantAnimation will assist with the look and feel of the result.
                  You presumably have some underlying model that the UI interacts with, so use signals and slots for that.

                  There is probably more than just this one widget in the dashboard, if so structure your graphical widgets hierarchically where common functionality is provided by base classes.

                  M Offline
                  M Offline
                  Murari G
                  wrote on last edited by
                  #8

                  @KenAppleby-0 Screenshot 2023-10-27 163253.png
                  I could Implement this much

                  JonBJ KenAppleby 0K 2 Replies Last reply
                  1
                  • M Murari G

                    @KenAppleby-0 Screenshot 2023-10-27 163253.png
                    I could Implement this much

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by
                    #9

                    @Murari-G Looks good, well done!

                    M 1 Reply Last reply
                    0
                    • M Murari G

                      @KenAppleby-0 Screenshot 2023-10-27 163253.png
                      I could Implement this much

                      KenAppleby 0K Offline
                      KenAppleby 0K Offline
                      KenAppleby 0
                      wrote on last edited by
                      #10

                      @Murari-G That's a good start. :-)

                      1 Reply Last reply
                      0
                      • JonBJ JonB

                        @Murari-G Looks good, well done!

                        M Offline
                        M Offline
                        Murari G
                        wrote on last edited by
                        #11

                        @JonB Thank You

                        1 Reply Last reply
                        0
                        • M Murari G has marked this topic as solved on

                        • Login

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