Initially hidden control in Qt Creator

后端 未结 2 2030
迷失自我
迷失自我 2020-12-11 00:06

I want to make a group box shown only when a radio button is selected.
I managed to do that by connecting the toggled(bool) signal of the radio button to th

2条回答
  •  一生所求
    2020-12-11 00:25

    You can't.

    The visible property seems to be voluntarily removed from the property editor of Qt Designer and you can't add it back.

    You can add the property manually to the .ui file by adding the following XML block inside the node for the widget you want to hide:

    
       false
    
    

    But the widget won't be visible or movable when you reopen the interface with the designer. It will still appear in the widget hierarchy though.

提交回复
热议问题