Results 1 to 4 of 4

Thread: how to show Grid on canvasview

  1. #1

    Default how to show Grid on canvasview

    --i have run the example gridview at http://www.ida.liu.se/~TDDB28/kursbi...ples/gridview/
    -> it run ok. But it just run on widget.
    How can i use class QGridView on canvasview?

  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: how to show Grid on canvasview

    You can, for example, implement an item that will draw the grid on the canvas.

  3. #3

    Question Re: how to show Grid on canvasview

    how can i do? please say more detail . thank for your help!.
    Would you please give me some examples about that. thanks so much!

  4. #4
    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: how to show Grid on canvasview

    You need to implement a subclass of QCanvasItem and draw the grid there the same way the "gridview" app does that on a widget. Please take a look at QCanvas docs for details and examples.

    http://doc.trolltech.com/3.3/canvas.html

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.