PDA

View Full Version : Newbie needs advice



Seth
12th April 2007, 03:30
Hi all,

What kind of Main Window should I use?

I want a main window where I can draw a line by free hand, then add attributes to that line (attributes to be stored).

If anyone can point me to a main window code that I should use I would appreciate it. I want to look at that code, understand that code, and build upon that code.

Eventually I want to build the below but I need a good starting point to understand what is going on, so I am looking for a Main Window on where I should start.
http://www.powerworld.com/images/simb7runmode.jpg

Thanks in advance

Seth

sunil.thaha
12th April 2007, 07:33
I would subclass QMainwindow and have QGraphicsView as the central widget.

Seth
12th April 2007, 22:16
Sounds good!

Can you direct me to some already developed code that uses both QMainwindow as a subclass and QGraphicsView as the central widget so I can study it and learn from it?

Thanks in advance!

marcel
12th April 2007, 22:50
See the Ported Canvas example in the Qt Demos. It is in the Graphics View section. Also there are several other examples involving QGraphicsView/QGraphicsScene.

You should also read the Graphics View Framework, in Assistant.

Regards.