Results 1 to 3 of 3

Thread: QStackedWidget Button menu

  1. #1
    Join Date
    May 2011
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default QStackedWidget Button menu

    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?

  2. #2
    Join Date
    Jun 2011
    Posts
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QStackedWidget Button menu

    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.

  3. #3
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: QStackedWidget Button menu

    You can use QWidget with a QGridLayout and add QPushButtons to it, using QStackedWidget / QButtonGroup will not of the required help to you.

Similar Threads

  1. Replies: 0
    Last Post: 15th February 2010, 11:47
  2. Help with QStackedWidget
    By onírico in forum Newbie
    Replies: 6
    Last Post: 12th November 2009, 16:34
  3. Button shortcut call an element in the menu
    By mourad in forum Qt Programming
    Replies: 5
    Last Post: 29th May 2008, 10:02
  4. Replies: 2
    Last Post: 2nd April 2008, 17:28
  5. Action-Menu-Button
    By hgedek in forum Newbie
    Replies: 1
    Last Post: 1st October 2007, 16:41

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.