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 add an "on_click" event to viewfinder from QCamera
Forum Updated to NodeBB v4.3 + New Features

How to add an "on_click" event to viewfinder from QCamera

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 830 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.
  • C Offline
    C Offline
    CptN3m0
    wrote on last edited by
    #1

    How Can I add an event on_click for the viewfinder widget from QCamera or is there any possibility?

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Just reimplement mouseReleaseEvent http://doc.qt.io/qt-5/qwidget.html#mouseReleaseEvent

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      C 1 Reply Last reply
      2
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        1. Subclass QCameraViewFinder and implement mousePressEvent or mouseReleaseEvent
        2. Use an event filter

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

        1 Reply Last reply
        2
        • VRoninV VRonin

          Just reimplement mouseReleaseEvent http://doc.qt.io/qt-5/qwidget.html#mouseReleaseEvent

          C Offline
          C Offline
          CptN3m0
          wrote on last edited by CptN3m0
          #4

          @SGaist said in How to add an "on_click" event to viewfinder from QCamera:

          Hi,

          1. Subclass QCameraViewFinder and implement mousePressEvent or mouseReleaseEvent
          2. Use an event filter

          Can you send me an example of this please?

          1 Reply Last reply
          0
          • VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by
            #5

            http://doc.qt.io/qt-5/qtwidgets-widgets-scribble-example.html

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            1 Reply Last reply
            3

            • Login

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