Results 1 to 2 of 2

Thread: Qt text edit paint event

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Qt text edit paint event

    Hello,

    I've subclassed the paintEvent of QTextEdit.
    I get the following error :

    "QPainter::begin: Widget painting can only begin as a result of a paintEvent."

    Any idea?

  2. #2
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Re: Qt text edit paint event

    Solved:

    Qt Code:
    1. QPainter painter(viewport());
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. Text edit and maxLength
    By vieraci in forum Newbie
    Replies: 4
    Last Post: 6th December 2011, 01:43
  3. Replies: 8
    Last Post: 15th May 2007, 09:21
  4. automatic scrolling text edit
    By Vash5556 in forum Newbie
    Replies: 2
    Last Post: 19th March 2007, 18:32
  5. Finding text on Text edit
    By jyoti kumar in forum Qt Programming
    Replies: 2
    Last Post: 18th May 2006, 13:20

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.