Results 1 to 2 of 2

Thread: Tile editor

  1. #1
    Join Date
    Sep 2011
    Posts
    3
    Thanks
    1

    Default Tile editor

    Hi. Im new to Qt and Im trying to get a feel for it by implementing a simple level editor. The editor works by allowing you to place tiles in a grid. It should support three layers (back, main, front) of tiles. Before I get to far I wanted to investigate the "best" way of doing this.

    This is what I came up with so far

    • Scrollarea with huge frame and label with pixmaps as tiles (didnt like this idea)
    • using the graphics scene/view framework (feels better to me but I have the following questions: Is it smart enough to only render whats visible in the view and since QGraphicsScene::drawItems have been deprecated what other options do I have to control the rendering?


    Please let me know if you have any other suggestions on how to implement this.

    Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Tile editor

    I'd go for QGraphicsView. It is smart enough to only render what is visible. There are also various option to improve the rendering. Furthermore the view will provide scrollbars and you can "fake" the layers by grouping the items. Use the z order for relative positioning. Have a look at the Graphics View Examples.

  3. The following user says thank you to Lykurg for this useful post:

    danca226 (10th September 2011)

Similar Threads

  1. Synchronize with Editor
    By dwarnold45 in forum Newbie
    Replies: 0
    Last Post: 31st March 2010, 04:40
  2. Tile rendering with QGLWidget
    By h123 in forum Qt Programming
    Replies: 2
    Last Post: 10th November 2008, 22:27
  3. How works tile() ?
    By looki in forum Qt Programming
    Replies: 0
    Last Post: 30th September 2008, 13:25
  4. Not an editor, nor IDE ;)?
    By whp in forum Qt-based Software
    Replies: 0
    Last Post: 27th February 2007, 12:32
  5. RTF editor
    By prakash in forum Qt Programming
    Replies: 10
    Last Post: 14th April 2006, 17:33

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.