Results 1 to 9 of 9

Thread: QList question

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QList question

    A list keeps a copy of your original object.

    As for your error, what is the type of tokens? Isn't it by any chance QVector? What does tokens.size() return?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Oct 2014
    Posts
    7
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QList question

    Sorry... I should've mentioned that.

    line is a QString and tokens is a QStringList.

    I'm reading a spreadsheet and splitting the line by the commas.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QList question

    Why do you say the problem is with some slider? You are not running this code from a worker thread, are you?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Oct 2014
    Posts
    7
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QList question

    No. This code is in the UI thread.

    That's what is confusing me. I can't figure out why the slider is crashing. It works fine before this code runs.
    I've worked on this for two days now. My best guess is that some code or memory is getting corrupted somehow.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QList question

    So if you comment out lines #17-26 then some other code stops crashing?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QList Question
    By giblit in forum Qt Programming
    Replies: 2
    Last Post: 4th April 2013, 01:41
  2. QList<QList > question
    By SubV in forum Qt Programming
    Replies: 3
    Last Post: 25th July 2008, 15:14
  3. QList question
    By MarkoSan in forum Qt Programming
    Replies: 2
    Last Post: 23rd January 2008, 07:51
  4. QList question
    By aamer4yu in forum Qt Programming
    Replies: 4
    Last Post: 2nd April 2007, 13:43
  5. QList question
    By ln\ in forum Newbie
    Replies: 2
    Last Post: 19th December 2006, 13:01

Tags for this Thread

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.