PDA

View Full Version : Drawing text within rectangular in textbrowser



addu
18th September 2009, 15:24
Hi All

I tried to draw the rectangular with

QPainter painter(this);
painter.setPen(Qt::red);
painter.drawLine(100,100,100,100);

but i don't see any rectangular input window and one more thing once we drawn the recangular to add the string and how do set in text browser..


please help me

Thanks

Yuvaraj R

Scorp2us
18th September 2009, 16:17
Your post makes no sense. I know English isn't your first language, but in whatever language, the proper Qt concepts aren't being applied. Could you work on a longer post so we can make sense of what you are trying to do?

For instance:
drawRect(), not drawLine() for a rectangle.

What text? What input box?

DrDonut
18th September 2009, 16:28
If you want to input text in an rectengular textbox, you might want to look into QTextEdit (http://doc.trolltech.com/4.5/qtextedit.html).

Good luck!

addu
18th September 2009, 16:48
Hi All

I am asking apologies for my mistake..while typing the sentence i did mistake.It won't happen in future

Even i used the drawRect() function ,but i am not see rectangle in output.

My question is how do add the string for drawn rectangular and update string(with rectangle)to text browser.


Thanks

Yuvaraj R

addu
21st September 2009, 07:21
Hi All

Even I could not able to draw


tatic const QPointF points[4] = {
QPointF(10.0, 80.0),
QPointF(20.0, 10.0),
QPointF(80.0, 30.0),
QPointF(90.0, 70.0)
};

QPainter painter(this);
painter.drawPolygon(points, 4);


Please help me


Thanks

Yuvaraj R