Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Show the part touched by user from tactical screen on Qt gui application



  • I everyone,

    • Context:
      I have a physical device plugged in USB to my laptop. This physical device is a tactical screen, like a smartphone, and send a CAN Message though USB when user touch on the screen.
      The CAN Message payload contain the x and y from the part touched by the user.
      This is my input for Qt Creator tool.

    • What I want to do:
      I would like to display inside my Qt GUI application on Windows the exact part of the screen touched by the user physically.
      It can be just a red round display during few second and desapear when user stop to touch the screen (in fact, when I receive frame without payload).

    • My question :
      Which Widget is the best in Qt to do that?? Have we a widget like screen Widget to do that?
      Overall, what is the way to make a Qt GUI application who represents a Screen ?

    Thank you for your time and your help!


  • Lifetime Qt Champion

    Hi,

    Do you mean you want to show that on top of your application or above anything and everything ?



  • @martial123 said in Show the part touched by user from tactical screen on Qt gui application:

    It can be just a red round display during few second and desapear when user stop to touch the screen (in fact, when I receive frame without payload).

    Hi!

    I would like to display that inside my Qt gui application thank to Qt creator tool.
    Like if you use a QPush button inside your Gui app..
    But here I would like to reproduce a tactical screen inside Qt app ,
    It can be a black square inside my GUI, and I will be able to show where the user have touched on the real screen plugged on my laptop ..

    How can I do that, and what is the widget to do that in Qt??

    Thank you.


  • Lifetime Qt Champion

    There's no specific widget for that. You'll have to write it yourself.

    By "Tactical screen" do you mean a military grade screen ?



  • @SGaist Thank for your replay !
    OOH fuckkk , I will need to code this by my self..
    Have you some idea to do that??

    And not, my screen is not "military quality" ^^ Qt is used just as report in order to show to the user which part of the screen is touched..


  • Lifetime Qt Champion

    Is this going to be a full screen widget with the focus ?



  • @SGaist said in Show the part touched by user from tactical screen on Qt gui application:

    Is this going to be a full screen widget with the focus ?

    Ok look here you can see my Main windows made with Qt :
    Midmark_overlay_Qt.PNG

    In the top of my Window, you can see an image from the real device physique.
    Inside this device, you can see the tactical screen inside the Hour Write down ( top left).
    It's a 5 inch screen. Inside this screen, there is an soft with app like a smarphone or connected watch but we don't care.

    So what I want is when user touch the real screen, display on this view ( mainWindows) the position of his finger on the 5 inch screen.

    Is it clear?

    My first choice was to use a lot of QPushButton to create "Pixcels" and command these QPushButton accordingly to the x;y receive in order to change his color or something else. The goal is to understand and see where the user touch the screen.
    But this solution will require a lot of time and its not very proper solution i think ..

    Thank you.


  • Lifetime Qt Champion

    Haaa ! I realized that I misunderstood the device / application link.

    So you would like to "over-paint" on top of your device image ?

    One possible way is to use a custom QLabel and reimplement the paint event to draw on top of the device image.



  • @SGaist
    Thank you so much !! I will explore this solution and i let u know by next week is it's a relevant solution!
    Have a great end of week!


Log in to reply