Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. How to make mouse back button to start funktion

How to make mouse back button to start funktion

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 357 Views
  • 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.
  • J Offline
    J Offline
    Jalle
    wrote on last edited by
    #1

    I need that to my game. Maybe using same to other buttons later

    J.HilkJ 1 Reply Last reply
    0
    • J Jalle

      I need that to my game. Maybe using same to other buttons later

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

      @Jalle
      listen for the MouseEvent:
      https://doc.qt.io/qt-6/qmouseevent.html#QMouseEvent-4

      you probably want to install an event filter on your main application instance

      and check the MouseButton that is pressed.
      https://doc.qt.io/qt-6/qt.html#MouseButton-enum
      the back button has the value: 0x00000008

      How all this translates to the python bindings, no idea, sry


      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
      1

      • Login

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