QGraphicsWidget - How does it work?
I've been reading the Docs and searching for examples on QGraphicsWidget. I've been doing my project with QGraphicsItem, but now I found out only QGraphicsWidget has a layout. Now I want to use all the QGraphicsWidget functionality.
But I really cant understand how it works. Do I add a QGraphicsItem to it, or can I directly add a QPixmap?
It says
Code:
QGraphicsWidget
::QGraphicsWidget ( QGraphicsItem * parent
= 0, Qt
::WindowFlags wFlags
= 0 )"The optional parent argument is passed to QGraphicsItem's constructor."
What does that mean? That to each QGraphicsItem I have I need to create a new QGraphicsWidget for it? :confused:
Thats it. If anyone can help me "see the light", I am most grateful.:)
Re: QGraphicsWidget - How does it work?
Quote:
Originally Posted by
been_1990
I've been reading the Docs and searching for examples on QGraphicsWidget. I've been doing my project with QGraphicsItem, but now I found out only QGraphicsWidget has a layout. Now I want to use all the QGraphicsWidget functionality.
But I really cant understand how it works.
This approach is useful for widgets that only serve the purpose of organizing child widgets into a layout. QGraphicsWidget can be used as a base item for your own custom item if you require advanced input focus handling, e.g., tab focus and activation, or layouts.
Quote:
Do I add a QGraphicsItem to it, or can I directly add a QPixmap?
:confused::confused::confused:
Re: QGraphicsWidget - How does it work?
Okay, so maybe I got the wrong idea about QGraphicsWidget.
Quote:
This approach is useful for widgets that only serve the purpose of organizing child widgets into a layout.
So QGraphicsWidget is a "container" for Widgets inside QGraphicsView?
Can I organize QGraphicsItem with QGraphicsWidget?