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. I don't want QComboBox to get focus when hovering over the mouse, but only after I click it will it get focus
Qt 6.11 is out! See what's new in the release blog

I don't want QComboBox to get focus when hovering over the mouse, but only after I click it will it get focus

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 4 Posters 623 Views 3 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.
  • J Offline
    J Offline
    John Van
    wrote on last edited by
    #1

    I have tried installing EvnetFiliter and rewriting mousemoveEvent, but none of them worked。

    T Pl45m4P 2 Replies Last reply
    0
    • J John Van

      I have tried installing EvnetFiliter and rewriting mousemoveEvent, but none of them worked。

      T Offline
      T Offline
      Tink
      wrote on last edited by
      #2

      @John-Van i don't see my comboboxes getting focus when hovering over them... or do you mean the hover style effect? Anyways the FocusPolicy can be set to ClickFocus.

      1 Reply Last reply
      2
      • J John Van

        I have tried installing EvnetFiliter and rewriting mousemoveEvent, but none of them worked。

        Pl45m4P Offline
        Pl45m4P Offline
        Pl45m4
        wrote on last edited by
        #3

        @John-Van

        The comboBox or the items in comboBox dropDown?
        These can be styled very easily using stylesheets.


        If debugging is the process of removing software bugs, then programming must be the process of putting them in.

        ~E. W. Dijkstra

        Axel SpoerlA 1 Reply Last reply
        0
        • Pl45m4P Pl45m4

          @John-Van

          The comboBox or the items in comboBox dropDown?
          These can be styled very easily using stylesheets.

          Axel SpoerlA Offline
          Axel SpoerlA Offline
          Axel Spoerl
          Moderators
          wrote on last edited by Axel Spoerl
          #4

          @Pl45m4

          myComboBox->setFocusPolicy(Qt::ClickFocus);
          

          should solve it.

          Software Engineer
          The Qt Company, Oslo

          1 Reply Last reply
          1
          • J John Van has marked this topic as solved on

          • Login

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