Results 1 to 4 of 4

Thread: Q3ButtonGroup

  1. #1
    Join Date
    Mar 2007
    Posts
    15
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Q3ButtonGroup

    I am having a problem with Q3ButtonGroup in my application. I have ported to qt4 and replaced all entries with Q3buttongroup and application builds fine. However I am not able to get buttons groups at all . For all individual button I am using QabstractButton.

    Do I have to change anything else besides this after porting to Qt 4.


    As mentioned in documention ,I am using button group following way:-
    The button group is an invisible widget and the contained buttons have some other parent widget.I am inserting each button manually inserted using insert(), into the button group and through a given indentifier.

    Please refer attached files for code snippet where i am trying to create buttons .
    Attached Files Attached Files
    Last edited by Project25; 10th April 2007 at 22:13. Reason: updated contents

  2. #2
    Join Date
    Jan 2006
    Location
    Paris, France
    Posts
    227
    Thanks
    3
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Q3ButtonGroup

    Well,

    QButtonGroup in Qt4 is no longer a widget containing buttons, it contains only indexed references to them.

    Check the documentation : http://doc.trolltech.com/4.2/qbuttongroup.html

    You can use QGroupbox to store visually your buttons, and if you need identifiers, use QButtonGroup in complement.

  3. #3
    Join Date
    Mar 2007
    Posts
    15
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Q3ButtonGroup

    even Q3buttongroup will not work coz its in qt 3support libarary ?

  4. #4
    Join Date
    Jan 2006
    Location
    Paris, France
    Posts
    227
    Thanks
    3
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Q3ButtonGroup

    Sure, it will work, but you must see it as a temporary solution : those classes were meant to port quicky Qt3 apps to Qt4, but they don't have all the functionalities of equivalent Qt4 classes...

    If you want your application to be stable, I highly recommend you to get rid of those support classes, and write pure Qt4 code.

  5. The following user says thank you to guilugi for this useful post:

    Project25 (17th April 2007)

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.