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 detect the mousebuttonpress event in the page view of the tabwidget?

How to detect the mousebuttonpress event in the page view of the tabwidget?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 369 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.
  • W Offline
    W Offline
    www111
    wrote on last edited by
    #1

    Hi folks,

    I am going to implement a feature to detect which tab widget is currently focused by the user.
    I notice that the event is only sent to the event filter when the user clicks the tab bar. However, I would expect the event signal to be emitted when the user clicks the page area of the tabwidget.

    I am using C++. I would like to know if I can override the event from the subclass of the tabwidget. Or a better solution for this feature?

    I understand that from the document, there is no mousebuttonpress event in the tabwidget.

    1 Reply Last reply
    0
    • jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on last edited by
      #2

      It would help to have some code to refer to.

      QApplication::focusChanged() might be a solution.

      Asking a question about code? http://eel.is/iso-c++/testcase/

      1 Reply Last reply
      1
      • W Offline
        W Offline
        www111
        wrote on last edited by
        #3

        @jeremy_k I appreciate it. I successfully implemented that feature.

        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