PDA

View Full Version : Creating a QGraphicsView that looks like a "page"



Valheru
11th November 2007, 14:19
I want to create a widget the displays a QGraphicsView in a way that looks like Acrobat Reader of Word displays documents, ie. that the user has the impression of a page floating above a tabletop. Does anyone know how to achieve this?

wysota
11th November 2007, 15:02
But what is the problem? Have you already tried anything? According to me simple and acceptable solutions are to embed the view into a "page" widget or to draw the "page" as the background of the scene visualized by the view.

Valheru
14th November 2007, 06:27
The first thing I did was to embed the QGraphicsView into a QWidget. That's not what I'm talking about. I mean when you look at Acrobat Reader or Word they make the page appear as though it's floating above the widget, casting a shadow. I can't achieve that look using Qt4, and was wondering if anyone knew if it was possible.

jpn
14th November 2007, 08:57
Create two items: a white page item on top of a gray shadow item.

wysota
14th November 2007, 09:55
Create two items: a white page item on top of a gray shadow item.

The drawback is that you'll have to hide them when printing the scene.