Results 1 to 3 of 3

Thread: Running text & slow drawText

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2009
    Posts
    6
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Arrow Running text & slow drawText

    Hi.
    I want to implement a running text line for typing trainer. I need it to be smooth, so I cant use QLineEdit and move text by one character.
    So I wrote my own widget which draw text with QPainter::drawText and move every character aproximately in 10 steps with 10 milisecond interval.

    It works quite good, but drawText seems to be a quite slow operation.
    When I use 35 font size it works perfect, but when I use smth like 55-75 (the text to draw become bigger) my widget cant keep pace with me (I type about 60wpm) on my old computer (and CPU usage jump from 20% to 98%).

    So I need to make it faster. Are there any better (faster) ways to draw text?
    Attached Files Attached Files

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. Why is drawText so terribly slow?
    By Ntoskrnl in forum Qt Programming
    Replies: 8
    Last Post: 1st August 2008, 19:15
  3. Text file parsing too slow
    By Potch in forum Newbie
    Replies: 5
    Last Post: 11th July 2008, 21:16
  4. QTextEdit slow to insert text
    By thomaspu in forum Qt Programming
    Replies: 4
    Last Post: 10th January 2008, 12:05
  5. Drawing antialiased text on Windows very slow
    By Rawk in forum Qt Programming
    Replies: 13
    Last Post: 14th May 2007, 14:13

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.