Results 1 to 6 of 6

Thread: QTreeWidget crash (improver use?)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Nov 2008
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QTreeWidget crash (improver use?)

    Quote Originally Posted by tbscope View Post
    First of all, the code you posted is very weird.
    Why do you code the implementation in the header? Are you coming from a C# world?
    Nope. It's easier to post here. The source and the header is separated in my solution.
    And it is a samle code.

    Quote Originally Posted by tbscope View Post
    I copied your code and tried it for myself. It doesn't crash for me.
    Post the error you get please.
    I don't know if it matters, i compile it with VS 2008 x64 and run it on a Windows 7 x64 system.
    Qt Code:
    1. Unhandled exception at 0x65948c50 (QtGuid4.dll) in trash2.exe: 0xC0000005: Access violation reading location 0xffffffffffffffff.
    To copy to clipboard, switch view to plain text mode 

    It's crashes in this part ( should i post the Call Stack? ):
    Qt Code:
    1. QVariant QTreeModel::data(const QModelIndex &index, int role) const
    2. {
    3. if (!index.isValid())
    4. return QVariant();
    5. QTreeWidgetItem *itm = item(index);
    6. if (itm)
    7. return itm->data(index.column(), role);
    8. return QVariant();
    9. }
    To copy to clipboard, switch view to plain text mode 

    Quote Originally Posted by tbscope View Post
    The use of ui is a little bit strange to me.
    And you should include QTreeWidgetItem
    Iit was generated using the default Qt Application project settings in VS2008.
    I think the QTreeWidget.h includes QTreeWidgetItem and QTreeWidget is included in the ui's header.
    Attached Files Attached Files
    Last edited by csernai.csaba; 18th June 2010 at 08:27. Reason: Added .ui form

Similar Threads

  1. QComboBox crash
    By sfilez in forum Newbie
    Replies: 4
    Last Post: 7th July 2009, 23:31
  2. Replies: 2
    Last Post: 17th March 2008, 12:53
  3. QDevelop 0.25 crash
    By peppino in forum Qt-based Software
    Replies: 7
    Last Post: 17th December 2007, 21:02
  4. Replies: 1
    Last Post: 19th October 2007, 01:29
  5. QTreeWidget->clear() causing crash after sort
    By Chuk in forum Qt Programming
    Replies: 7
    Last Post: 3rd September 2007, 09:59

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.