Results 1 to 5 of 5

Thread: Creating a QGraphicsView that looks like a "page"

  1. #1
    Join Date
    Aug 2006
    Posts
    163
    Thanks
    12
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Creating a QGraphicsView that looks like a "page"

    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?

  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: Creating a QGraphicsView that looks like a "page"

    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.

  3. #3
    Join Date
    Aug 2006
    Posts
    163
    Thanks
    12
    Thanked 5 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Creating a QGraphicsView that looks like a "page"

    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.

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Creating a QGraphicsView that looks like a "page"

    Create two items: a white page item on top of a gray shadow item.
    J-P Nurmi

  5. #5
    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: Creating a QGraphicsView that looks like a "page"

    Quote Originally Posted by jpn View Post
    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.

Similar Threads

  1. Creating a widget on a QGraphicsView
    By maverick_pol in forum Qt Programming
    Replies: 4
    Last Post: 9th August 2007, 17:54

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.