PDA

View Full Version : QStackedWidget Button menu



kewal.deshpande
14th June 2011, 06:57
I am trying to create a button menu and for which I am using a QStackedWidget,.
should i be using a button group or a widget to put the buttons inside the Qstacked widget,..I am trying to create a iphone sort of menu any hints on this?

almboa
14th June 2011, 07:56
You can not create a QButtonGroup OR a QWidget. A QButtonGroup is not a QWidget. A QStackedWidget needs a QWidget or a subclass. You could add a QPushButton to the stack, but im sure thats not what you want.

You need to create a QWidget which contains the button menu. Whether or not to put the (or just some) buttons in a QButtonGroup depends on how they are belonging to each other.

Santosh Reddy
14th June 2011, 08:13
You can use QWidget with a QGridLayout and add QPushButtons to it, using QStackedWidget / QButtonGroup will not of the required help to you.