Results 1 to 4 of 4

Thread: Buttons in Graphics Scene

  1. #1
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Buttons in Graphics Scene

    Is there any way to make push buttons in graphics scene ??
    Actually I wanted to represent a remote for camera in GUI. I thought it would be easier using QGraphicsItems,,, but I dont get the feel of button for graphics item.

    Other way is to mask a pushbutton... but that will allow me to have a certain for a single pushbutton ... what I need is to place several buttons in the remote as pushbuttons.

    any suggestions to achieve this ??

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Buttons in Graphics Scene

    If yu don't need anything funky, I wouldn't use the graphics view framework for this. But if you want to use the framework, you can have a custom item that will use QStyle to draw the looks of a button. Other alternatives are using pixmap items for buttons or waiting for Qt 4.4 to use widgets on canvas.

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Buttons in Graphics Scene

    thnks..
    i dont anything funky... what i want is to place many buttons in a widget.
    or there some way where i can use bitmap mask for remote control...and make small regions in the widget as buttons ?? how can i achieve the functionality using widgets / pushbuttons ??

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Buttons in Graphics Scene

    You can use stylesheets to style your buttons, I think it'll be as simple as can be. You might also set icons on buttons (toolbuttons) and make the buttons flat (autoRaise property set to true). This way you'll be able to represent buttons as images and still let the user know they are buttons when you hover mouse over them. In either case prefer using toolbuttons over pushbuttons.

Similar Threads

  1. Creating new scene from a part of an old one
    By maverick_pol in forum Qt Programming
    Replies: 6
    Last Post: 28th November 2007, 18:14
  2. Creating a scene from piece of another scene
    By maverick_pol in forum Qt Programming
    Replies: 3
    Last Post: 23rd August 2007, 17:51
  3. How to use QGraphicsView and Scene right ...
    By Mike in forum Qt Programming
    Replies: 6
    Last Post: 22nd January 2007, 08:51
  4. QTreeWidget and Graphics scene
    By aamer4yu in forum Qt Programming
    Replies: 7
    Last Post: 21st December 2006, 17:24

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.