[Qt-interest] layers of QGraphicsView

manish.s.sharma at nokia.com manish.s.sharma at nokia.com
Tue Aug 9 06:41:08 CEST 2011


Just searched a bit in qt-interest archive and it seems there is already a discussion on this (though quite old :()

http://lists.trolltech.com/qt-interest/2006-12/thread00102-0.html
http://lists.trolltech.com/qt-interest/2007-01/thread00039-0.html

Regards,
Manish

From: ext pengliang(彭亮) [mailto:pengliang at founder.com]
Sent: Tuesday, August 09, 2011 9:33 AM
To: Sharma Manish.S (Nokia-SD/Bangalore); pengliang at founder.com; qt-interest at qt.nokia.com
Subject: 答复: [Qt-interest] layers of QGraphicsView

I think this approach is very good, but I want to show multi layers, and QGraphicsView can only set one QGraphicsScene.
Thanks
Ken


________________________________
发件人: manish.s.sharma at nokia.com [mailto:manish.s.sharma at nokia.com]
发送时间: 2011年8月9日 11:55
收件人: manish.s.sharma at nokia.com; pengliang at founder.com; qt-interest at qt.nokia.com
主题: RE: [Qt-interest] layers of QGraphicsView

3. create different QGraphicsScene for each layer and call QGraphicsView::setScene() with correct scene instance corresponding to the layer which you  want to show.

Regards,
Manish

From: qt-interest-bounces+manish.s.sharma=nokia.com at qt.nokia.com [mailto:qt-interest-bounces+manish.s.sharma=nokia.com at qt.nokia.com] On Behalf Of ext manish.s.sharma at nokia.com
Sent: Tuesday, August 09, 2011 9:21 AM
To: pengliang at founder.com; qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] layers of QGraphicsView

I can think of below options.

1.       Split your scene in regions and name them as layers and scroll your graphicsview across regions when you want to activate a particular layer. Here region corresponds to layers.

2.       Crate one parent GraphicsItem for each layer. Then add child items in the corresponding parent item and later you can just set visibility of the parent item.

Regards,
Manish

From: qt-interest-bounces+manish.s.sharma=nokia.com at qt.nokia.com [mailto:qt-interest-bounces+manish.s.sharma=nokia.com at qt.nokia.com] On Behalf Of ext pengliang(??)
Sent: Tuesday, August 09, 2011 6:53 AM
To: qt-interest at qt.nokia.com
Subject: [Qt-interest] layers of QGraphicsView


Hi All

     Please see the pic bellow.

I want to design a software like the picture show:

many layers in the left side:

I want to use QGraphicsScene to control and manage the QGraphicsItems in layer.

And QGraphicsView is the interface of graphic editor.

But, I don’t know how to display muliti layers. Because, “setScene” of QGraphicsView could only set one scene.

Or I need to use QGraphicsItemGroup to design the layers?

Anybody has this experience?

Thanks

Ken







[cid:image001.jpg at 01CC567B.BADBE0C0]




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110809/1e8d7c1c/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 20146 bytes
Desc: image001.jpg
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110809/1e8d7c1c/attachment.jpg 


More information about the Qt-interest-old mailing list