How to resize the QToolButton when focus is coming on that QToolButton

前端 未结 2 1331
[愿得一人]
[愿得一人] 2021-01-26 11:32

How to resize the QToolButton when focus is coming on that QToolButton. I am having 5 QToolButton, when focus is coming on 2nd QTool

2条回答
  •  孤街浪徒
    2021-01-26 12:24

    It is also possible via QSS:

    #MySecondButton:focus
    {
      width: 300px;
      height: 200px;
    }
    

    Depends on layouting and size policy it may require to set "max-width" / "max-height" / "min-width" etc, properties.

提交回复
热议问题