-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move only-one-active-toggle-feature from ofxGuiGroup to ofxToggle #16
Comments
@martialgallorini I am looking into the setExclusive feature of toggles in QT - I only find this: http://doc.qt.io/qt-4.8/qbuttongroup.html There the attribute is also applied to the group. Am I missing something or do you have another reference for me? Thank you! |
Hello @frauzufall , You can make all buttons checkable (to set them active or not) and make them auto exclusives. On a layout if you set all buttons auto exclusive, there will be only one button active at the same time for all buttons. If you need multiple groups of auto exclusive buttons, you can put them in a button group. More generally you can put them in different widgets (not only button groups) as the auto exclusive property action is relative to the parent widget. Say if you have 8 buttons and 4 in 2 different groups, all auto exclusive, you can have 2 buttons checked at the same time, eg. one in each group. Example code :
Groups are from QButtonGroup class : http://doc.qt.io/qt-5/qbuttongroup.html Buttons are QPushButton class objects, and some of the button properties, like "exclusive", are held by the base QAbstractButton class : http://doc.qt.io/qt-5/qabstractbutton.html hope this helps |
Was there every any progress on this? I could really use some sort of radio button or drop down in my current project. |
Hey Ben, you can already use radio toggles! Just add the toggles to a group or panel and call |
This issue is just about the way to implement that feature which I wanted to change once, I guess. |
as described in http://forum.openframeworks.cc/t/extending-ofxgui-with-new-widgets/16670/11?u=frauzufall
The text was updated successfully, but these errors were encountered: