??
QButtonGroup is nothing visible, it just manages buttons as a group. There is no way to setup a QButtonGroup from the Designer. The above example shows how to use QButtonGroup to avoid separate slots for each of those 12 buttons...
??
QButtonGroup is nothing visible, it just manages buttons as a group. There is no way to setup a QButtonGroup from the Designer. The above example shows how to use QButtonGroup to avoid separate slots for each of those 12 buttons...
J-P Nurmi
Thanks jpn
In the earlier version of the program I used the button group so I am familiar with it.
I was able to put the buttons in a "group box" in designer, but it took up more screen height then with individual buttons and the 12 signal-slot are no problem.
Thanks anyway
I'm starting to get the feeling that we are not understanding each other. We are talking about different things here.
In Qt3 QButtonGroup is a widget. In Qt4 it's not a widget nor nothing visible. It's just a concept of grouping any set of buttons together as a functionality. The buttons can even have different parents, and it has nothing to do with how the buttons are actually laid out.
The QButtonGroup example of mine was for Qt4. I wasn't talking about layouting or organizing the buttons in a form. I was talking about how to avoid those bunch of slots. It can be done with a single slot as the example was meant to present.
J-P Nurmi
Maybe we are. I was unable to find "button group" in your post. The only thing besides the text was two ?? in the upper left corner of the screen.
I'm a perverse old f... and not always wise, but you gave me good advise and some good information (can't use button groups in designer)
As an 80 old engineer my main thrust is setting up a standard user interface suitable for a wide range of programs where a new user, who knows his/her field, can learn to use it in a day or so. I would like to have all screen functions in the designer or not use the designer at all.
Thanks again, I really appreciate your help.
This is the "example" I have been referring to:
Many people (especially the ones switching from Qt3 to Qt4) tend to criticize Qt Designer. In my humble opinion it's just a great tool for it's purpose, designing GUI layouts. I guess the main reason for not including QButtonGroup in Designer is because it's not a widget but a functionality class. The Designer is for designing layouts, you code the functionality.
FAQ:
According to this poll, most people on this forum still seem to be happy with and using the Designer.Beginning with Qt4.0 Qt Designer seized to be an all-purpose development environment and became strictly a GUI Designer which can easily be incorporated into real IDEs like Visual Studio, Eclipse or KDevelop.
Anyway, there's a related entry in the Task Tracker: 126997 - Suggestion: QButtonGroup in Designer. Maybe in the future you can setup button groups from the Designer..
I'd say it's not about the age but the passion. You're not too old as long as you have any personal interest into programming. Of course amnesia and such might make it harder but...![]()
J-P Nurmi
Philosophical reasons aside, what is the real difference betwee the 12 + lines of code to build the button group and the 12 signal-slots?
I strongly doubt that (I haven't read the task-tracker entry though) as it will greatly limit the capabilities of the button group. Most people will not even look at the docs to see QButtonGroup is something more than what can be set from within Designer (i.e. adding buttons with different parents).
Clarity of code, speed of execution and sanity of the person maintaining the code. And besides that such solution is less error prone.
impeteperry (23rd January 2007)
Hi mysota
Understood
thanks
Bookmarks