Qt Widget QPainter->drawLine Where and How can I inprement ?

wathavy wathavy tacowathavy at yahoo.co.jp
Mon Mar 7 21:46:04 UTC 2005


I hope I am not embarassing ppl here by
posting inadaquate query.

I would be happy to know how I could draw lines 
to indicate some statistical data on screen.

These data consists of counts and its position.
I can draw lines and displace them by fixed 
distances if I could draw lines on client area.

I made an application using KDevelop3 using
wizzard [KDE]-[C++]-[Application framework]

In the skelton, I noticed there is somewhat like 

void myprojectAppView::print(QPainter *p, int height, int
    // do the actual printing, here
     p->drawText( 0, 0, "Text Drawn\n", 20, NULL);

Unfortunately, above is activated when I 
press "Print" menu, which I am not interested in now.

I would be happy if anone let me know how I could
imprement somewhat like this...
void myprojectAppView::paint(QPainter *p, ....)
     p->drawLine(100,100, Heavy_line, pen_solid);
This function to be called up eithre by my own function;
or by Window update message sent by Xwindow server(?).
or Linux/Unix system call.

So far I could only find QPainter does have a method
that will let me drawLine but I could not figure out
How to let application to have instance of it.
And the messages that I can draw lines with the
function I inserted into the skelton program.

Thank you for your attention.
I hope some one would give me the right instruction.

Let's Celebrate Together!
Yahoo! JAPAN

More information about the KDevelop-devel mailing list