Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. adding items to listwidget is slow in windows

adding items to listwidget is slow in windows

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 317 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    seok
    wrote on last edited by
    #1

    Hi ,
    in my application i need to add more items (more than 20 k ) to the list widget i am adding them using a for loop

    i calculated the time taken by this operation using the QElapsed timer and in linux the same function(where i am adding item to list widget) take less than 500msec which is fine,
    where as in windows it is taking 145281 msec (approximately 2min 40 sec)

    is there a way i can reduce this time i already tried with

    ui->listwidget->setuniformitemsize(true)
    

    but no luck

    please somebody suggest me a way to reduce the time and improve my application performance

    and i would really want to know why this issue happens with windows and works perfectly fine in linux

    please help me with this realy looking forward to your valuable suggestions

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Use a proper model instead the convenience widgets - they're made for convenience, not for speed.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      S 1 Reply Last reply
      2
      • Christian EhrlicherC Christian Ehrlicher

        Use a proper model instead the convenience widgets - they're made for convenience, not for speed.

        S Offline
        S Offline
        seok
        wrote on last edited by
        #3

        @Christian-Ehrlicher ok i will try it thank you

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved