Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. PNG Image on QLabel Behind Touch Screen
Forum Updated to NodeBB v4.3 + New Features

PNG Image on QLabel Behind Touch Screen

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
gui
14 Posts 3 Posters 1.6k Views 2 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #4

    Hi,

    It's the other way around, in the mousePressEvent you will decide what to do based on the coordinates.

    One other possibility would be to slice that image and recompose it in your application.

    Or use the Graphics View Framework to add transparent items on top of your main image to handle the various possible interactions. It could be also used for the above recomposition suggestion.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    nightowlN 1 Reply Last reply
    1
    • SGaistS SGaist

      Hi,

      It's the other way around, in the mousePressEvent you will decide what to do based on the coordinates.

      One other possibility would be to slice that image and recompose it in your application.

      Or use the Graphics View Framework to add transparent items on top of your main image to handle the various possible interactions. It could be also used for the above recomposition suggestion.

      nightowlN Offline
      nightowlN Offline
      nightowl
      wrote on last edited by
      #5

      @SGaist
      ok, are you saying ill get these 2 events:
      int QMouseEvent::x() const and int QMouseEvent::y() const
      what is...slice the image...means what...

      "Have A Good And Godly Day"

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #6

        No you get one mouse event with all the informations.

        By sliced I meant cutting the image in it's different interactive components. What you designer should have provided you with.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        nightowlN 1 Reply Last reply
        1
        • nightowlN Offline
          nightowlN Offline
          nightowl
          wrote on last edited by
          #7

          QMouseEvent::QMouseEvent...maybe this one...not sure how to set this up...

          "Have A Good And Godly Day"

          1 Reply Last reply
          0
          • SGaistS SGaist

            No you get one mouse event with all the informations.

            By sliced I meant cutting the image in it's different interactive components. What you designer should have provided you with.

            nightowlN Offline
            nightowlN Offline
            nightowl
            wrote on last edited by
            #8

            @SGaist
            it seems that the customer(designer) has designed the screens with the look&feel that they want. At least that seems to be the case for the "looks like" setup I saw on Tuesday...i've used Qt a few times in the past (2015&2017...v4.8), but it was all Qwidgets...never had to process x&y pixel locations...i did that kinda thing around 1985 or so...HP Apollo workstation running Aegis/DomainOS/UNIX-like...back then I mapped the entire 1280x1024 screen...buttons in the 256x1024 area on the right and 1024x1024 air situation area on the left...COTS system for an air traffic control contract bid while working for a DOD contractor...in my day...lol....Now if the customer designer wants his png slides to come to "life" behind the touch screen, can I just map the 720x1280 screen using a 2 dimensional array with a unique Number for the GUI items on the png image...do a switch case on the Number and process accordingly...will have to have a QTextEdit/LineEdit/PlainTextEdit...to display/delete the entries from the small keyboard, etc...Plus i got some circular progress bars i will have to create...that may require some "image slicing"...what's your take/thoughts...Thanks!!!

            "Have A Good And Godly Day"

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #9

              Depending on the target device QtQuick might be worth a check.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              nightowlN 1 Reply Last reply
              0
              • SGaistS SGaist

                Depending on the target device QtQuick might be worth a check.

                nightowlN Offline
                nightowlN Offline
                nightowl
                wrote on last edited by
                #10

                @SGaist
                ok...thanks...
                Is there a cell phone size keyboard widget available in Qt...?

                "Have A Good And Godly Day"

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #11

                  The QtVirtualKeyboard module ?
                  Note that this module is dual licensed GPL/Commercial.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  nightowlN 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    The QtVirtualKeyboard module ?
                    Note that this module is dual licensed GPL/Commercial.

                    nightowlN Offline
                    nightowlN Offline
                    nightowl
                    wrote on last edited by
                    #12

                    @SGaist
                    how do I size the keyboard to be small like a cell phone keyboard?

                    "Have A Good And Godly Day"

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #13

                      Based on the documentation you shall set its width so that the height get calculated for the value you want.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      nightowlN 1 Reply Last reply
                      0
                      • SGaistS SGaist

                        Based on the documentation you shall set its width so that the height get calculated for the value you want.

                        nightowlN Offline
                        nightowlN Offline
                        nightowl
                        wrote on last edited by
                        #14

                        @SGaist thanks much!!

                        "Have A Good And Godly Day"

                        1 Reply Last reply
                        0

                        • Login

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