Results 1 to 4 of 4

Thread: More CPU Load when using SetText

  1. #1
    Join Date
    Jun 2006
    Location
    San Diego, USA
    Posts
    95
    Thanks
    9
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default More CPU Load when using SetText

    Hi,

    Iam Using Qtopia -4.2. I am writing an application which had 3 tabs and under each tab I had 3 more sub tabs. Each sub tab had 10-15 line edit boxes will get data and each line edit box need to be updated for every 200ms using QTimer.

    I am using setText for updating the boxes. It seems to me setText is utilising more CPU load. So is there any other way to update the Lineedit boxes. It is just to display the text on to line edit.

    Thanks & Regards,
    Arun

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: More CPU Load when using SetText

    I would suggest using item views instead of loads of line edit widgets.
    J-P Nurmi

  3. #3
    Join Date
    Jun 2006
    Location
    San Diego, USA
    Posts
    95
    Thanks
    9
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: More CPU Load when using SetText

    Thanks for your reply.

    How can I use item views for displaying text. Can you give me a piece of code for displaying any text string.

    Thanks & Regards,
    Arun.

  4. #4
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: More CPU Load when using SetText

    Take a look at Qt Widget Gallery, specifically "Item Views". Decide whether you want a list, tree or table. It's easiest to start with item based convenience classes, QListWidget, QTreeWidget or QTableWidget. Take a look at their documentation. Each class provides example code snippets in "detailed description".
    J-P Nurmi

  5. The following user says thank you to jpn for this useful post:

    arunvv (24th January 2008)

Similar Threads

  1. How to load icons from resource file
    By joseph in forum Qt Programming
    Replies: 7
    Last Post: 25th June 2012, 07:00
  2. Program not compiling on Fresh install of Leopard
    By dvmorris in forum Qt Programming
    Replies: 1
    Last Post: 22nd November 2007, 10:22
  3. Problem with QLabel and setText
    By jambrek in forum Qt Programming
    Replies: 7
    Last Post: 31st October 2007, 16:02
  4. Replies: 2
    Last Post: 13th September 2006, 09:11
  5. Replies: 4
    Last Post: 7th March 2006, 08:52

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.