Results 1 to 19 of 19

Thread: Understanding why these few lines are slow

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Join Date
    Sep 2010
    Location
    Germany
    Posts
    28
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Understanding why these few lines are slow

    Try this :

    Qt Code:
    1. QList<QUrl> urlList = event->mimeData()->urls();
    2.  
    3. for (QList<QUrl>::const_iterator i = urlList.begin();
    4. i != urlList.end();
    5. i++)
    6. {
    7. QString strFile2 = (*i).toString();
    8. if (strFile2.endsWith(".png") || strFile2.endsWith(".gif")) {
    9. QString strFile1 = strFile2.mid(7, strFile2.length() - 2);
    10. ui->listWidget->addItem(strFile1);
    11. }
    12. }
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to Sven for this useful post:

    hakermania (5th February 2011)

Similar Threads

  1. Understanding RGB888
    By scarleton in forum Qt Programming
    Replies: 6
    Last Post: 29th August 2010, 20:03
  2. Having trouble understanding brush
    By feraudyh in forum Newbie
    Replies: 4
    Last Post: 30th July 2010, 18:18
  3. Better understanding of the ModelView archtecture
    By scarleton in forum Qt Programming
    Replies: 6
    Last Post: 28th June 2010, 07:07
  4. Help understanding QWT Contour Plot
    By jwieland in forum Qwt
    Replies: 11
    Last Post: 7th December 2009, 06:47
  5. I need help understanding QGraphicsView
    By aarelovich in forum Qt Programming
    Replies: 13
    Last Post: 22nd July 2009, 20:02

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
  •  
Qt is a trademark of The Qt Company.