dimanche 29 avril 2018

How do I setup a list of checkboxes in Qt Designer?

In my window, I have one menu which is a set selections, one of which can be current. For example, in my Browser I have sub-menus where I can select the Zoom Factor.

For example, it could be offering three options like these:

  50%
√ 100%
  150%

Whenever the user selects one of the 50%, 100%, or 150%, the current selection needs to get unselected. I was hoping we could set that up in designer so it becomes automatic when I create the window. (i.e. the designer generated code would be smart enough to add those 3 items in a QActionGroup.)

I've seen code that can be used to generate such a menu using QRadioButton, but I don't see a way to replicate that behavior in designer. Is that not available in the tool?




Aucun commentaire:

Enregistrer un commentaire