Results 1 to 2 of 2

Thread: Drawing a grid

  1. #1
    Join Date
    Jan 2010

    Default Drawing a grid


    Would anyone have any sample code for drawing a grid - a set of vertical and horizontal lines that fill a view space?

    Ideally I would like to draw a rectangular grid and then transform it to an isometric projection.

    Thank you!

  2. #2
    Join Date
    Jan 2006
    Thanked 52 Times in 52 Posts
    MacOS X Unix/X11

    Default Re: Drawing a grid

    Basically you overwrite QWidget:aintEvent, open a QPainter on that widget and have two for-loops: One for the vertical lines and one for the horizontal ones.
    It's nice to be important but it's more important to be nice.

Similar Threads

  1. drawing a grid
    By dreamer in forum Qt Programming
    Replies: 2
    Last Post: 27th April 2008, 09:17
  2. "Lay Out in a Grid" - how to see the grid?
    By will49 in forum Qt Tools
    Replies: 1
    Last Post: 25th July 2007, 20:09
  3. Grid Problem
    By merry in forum Qt Programming
    Replies: 2
    Last Post: 6th June 2007, 10:40
  4. How do I layout in a Grid?
    By DPinLV in forum Qt Tools
    Replies: 7
    Last Post: 10th August 2006, 01:37
  5. Grid layout
    By nupul in forum Qt Programming
    Replies: 7
    Last Post: 21st April 2006, 21:15

Tags for this Thread


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.