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. QPushbutton remove or modify dotted frame when it is focused

QPushbutton remove or modify dotted frame when it is focused

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 722 Views 2 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.
  • KutyusK Offline
    KutyusK Offline
    Kutyus
    wrote on last edited by
    #1

    Hi!

    I want to remove or modify the dotted rectangle from a focused qpushbutton without a style sheet.
    QPushButton does not have a setFrameStyle method, such as QListWidget.

    Thanks in advance.

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

      Hi,

      If without style sheet then you'll have to write a proxy style to draw the PE_FrameFocusRect for your button. See QStyle::CE_PushButton.

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

      KutyusK 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        If without style sheet then you'll have to write a proxy style to draw the PE_FrameFocusRect for your button. See QStyle::CE_PushButton.

        KutyusK Offline
        KutyusK Offline
        Kutyus
        wrote on last edited by
        #3

        @SGaist said in QPushbutton remove or modify dotted frame when it is focused:

        QStyle::CE_PushButton

        Thanks for the reply, I will try.
        SetFocusPolicy (Qt :: NoFocus) also provided a good solution.

        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