[Qt-interest] Using QGraphicsLayouts inside QGraphicsWidgets
Schimkowitsch Robert
Robert.Schimkowitsch at andritz.com
Mon Jun 27 11:00:33 CEST 2011
I would like to create a QGraphicsWidget (something like a toolbar),
that uses a QGraphicsLinearLayout inside, to manage the child
GraphicsWidgets.
My new GraphicsWidgets (let's call it ButtonBar) derives from
QGraphicsWidget, and has a QGraphicsLinearLayout as a member.
I have methods to add and remove items from the ButtonBar, and I
basically expose the LinearLayout's SizeHint as the ButtonBar's SizeHint
(so any outside layout will know how much room all my buttons need).
However, I have stumbled accross one problem I don't see a clean
solution to:
How will I realize when my LinearLayout needs to change it's size hint
(e.g. because one of the buttons changed in size), so I can call
updateGeometry and have my parent layout update?
It's all very well when a button is added and removed - I can always
call updateGeometry then. But what if a button changes in size for some
other reason? How will I know?
Any ideas how to solve that?
Kind regards
Robert Schimkowitsch
#####################################################################################
This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system.
Thank You.
ANDRITZ HYDRO GmbH
Rechtsform/ Legal form: Gesellschaft mit beschrankter Haftung / Corporation
Firmensitz/ Registered seat: Wien
Firmenbuchgericht/ Court of registry: Handelsgericht Wien
Firmenbuchnummer/ Company registration: FN 61833 g
DVR: 0605077
UID-Nr.: ATU14756806
#####################################################################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110627/a4a1a857/attachment.html
More information about the Qt-interest-old
mailing list