Results 1 to 18 of 18

Thread: QGraphicsScene and QGraphicsWidget (reusable and embeddable)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Join Date
    Nov 2007
    Posts
    35
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Re: QGraphicsScene and QGraphicsWidget (reusable and embeddable)

    I've put it in the title because it's very important: "(reusable and embeddable)" - the grid should be a reusable widget, easy to embed into any scene, even in large number (one scene contains more "grids").

    The natural way of working would be:

    - create new QGraphicsScene
    - create several new MyGrids
    - create some new "objects" (they would be basically QObject subclasses, with some extra features) via bit matrices for each
    - put those several new MyGrids on the scene

    MyGrid would be the class representing the concept of "grid" I've talked about in post #1. It has as children some rectangles managed in turn by a layout (default: QGraphicsGridLayout) for the reasons I've also mentioned in post #1.

    The question is just: What should MyGrid subclass, such that I can reuse as much as possible of the features already existing qt classes provide, to let the user (the real game developer) easily create and manipulate several MyGrid instances as his game requires.

    I hope it's clear now.
    Last edited by OriginalCopy; 4th April 2011 at 12:51.

Similar Threads

  1. Qml in QGraphicsWidget
    By animagani in forum Qt Quick
    Replies: 7
    Last Post: 2nd December 2010, 17:20
  2. QGraphicsWidget and ItemIsMovable()
    By paolom in forum Qt Programming
    Replies: 8
    Last Post: 20th October 2009, 14:25
  3. QTextEdit on a QGraphicsWidget
    By paolom in forum Qt Programming
    Replies: 2
    Last Post: 7th October 2009, 15:08
  4. Positioning QGraphicsWidget
    By jasper_ferrer in forum Qt Programming
    Replies: 3
    Last Post: 22nd September 2009, 15:34
  5. QGraphicsWidget - How does it work?
    By been_1990 in forum Qt Programming
    Replies: 2
    Last Post: 31st July 2009, 14:15

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
  •  
Qt is a trademark of The Qt Company.