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
Hi.
Hi.
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]
myprojectApp.
In the skelton, I noticed there is somewhat like
this.
void myprojectAppView::print(QPainter *p, int height, int
width)
{
// 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->moveTo(0,0);
p->drawLine(100,100, Heavy_line, pen_solid);
}
This function to be called up eithre by my own function;
---UpdateDrawing();
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.
Bye.
Wathavy.
__________________________________
Let's Celebrate Together!
Yahoo! JAPAN
http://pr.mail.yahoo.co.jp/so2005/
More information about the KDevelop-devel
mailing list