Results 1 to 2 of 2

Thread: Q3ValueList Problem

  1. #1
    Join Date
    Jun 2008
    Posts
    64
    Thanks
    7
    Qt products
    Qt3 Qt4

    Default Q3ValueList Problem

    While porting code from QT3 to QT4, I found that my program terminated unexpectedly, and the screen shows the following line:
    ASSERT: "i < this->size()" in file /usr/local/Trolltech/Qt-4.4.0/include/Qt/q3valuelist.h, line 201
    actually the program is running the following line:
    Qt Code:
    1. Q3ValueListIterator <TransactionHistory> itr = m_transaction_history.at( sequenceNo );
    To copy to clipboard, switch view to plain text mode 

    where
    Qt Code:
    1. Q3ValueList <TransactionHistory> m_transaction_history;
    2. int sequenceNo;
    To copy to clipboard, switch view to plain text mode 
    and "TransactionHistory" is a self defined class which hold some int values

    after dumping the details, I found that the size of m_transaction_history is 0 and sequenceNo is 0 too.
    In previous version(QT3), the line work fine......

    Can anyone tell me what's happening and how can I solve this?

  2. #2
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Q3ValueList Problem

    Where do you assign data to these variables:
    Qt Code:
    1. Q3ValueList <TransactionHistory> m_transaction_history;
    2. int sequenceNo;
    To copy to clipboard, switch view to plain text mode 

    and/or fill the q3valuelist with data ?
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

Similar Threads

  1. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  2. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 08:47
  3. problem with paint and erase in frame
    By M.A.M in forum Qt Programming
    Replies: 9
    Last Post: 4th May 2008, 20:17
  4. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.