Results 1 to 5 of 5

Thread: Drawing text within rectangular in textbrowser

  1. #1
    Join Date
    May 2009
    Posts
    129

    Default Drawing text within rectangular in textbrowser

    Hi All

    I tried to draw the rectangular with
    Qt Code:
    1. QPainter painter(this);
    2. painter.setPen(Qt::red);
    3. painter.drawLine(100,100,100,100);
    To copy to clipboard, switch view to plain text mode 

    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

  2. #2
    Join Date
    Apr 2008
    Posts
    45
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Drawing text within rectangular in textbrowser

    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?

  3. #3
    Join Date
    Mar 2008
    Posts
    27
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Drawing text within rectangular in textbrowser

    If you want to input text in an rectengular textbox, you might want to look into QTextEdit.

    Good luck!

  4. #4
    Join Date
    May 2009
    Posts
    129

    Default Re: Drawing text within rectangular in textbrowser

    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

  5. #5
    Join Date
    May 2009
    Posts
    129

    Default Re: Drawing text within rectangular in textbrowser

    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

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. Replies: 2
    Last Post: 23rd July 2012, 08:42
  3. Drawing Text
    By QbelcorT in forum Qt Programming
    Replies: 7
    Last Post: 8th March 2009, 17:33
  4. Drawing Rich Formatted Text with QPainter
    By millsks in forum Qt Programming
    Replies: 1
    Last Post: 5th March 2009, 19:59
  5. Problems with QString
    By cyberboy in forum Qt Programming
    Replies: 2
    Last Post: 13th October 2008, 08:18

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.