Results 1 to 11 of 11

Thread: Weird application crash

Hybrid View

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

    Default Re: Weird application crash

    You can't make an incorrect code work. Finding the real problem with a bad design will take more time than rewriting it using correct solutions. Either implement the model by subclassing from QAbstractListModel or switch to QStandardItemModel completely.

  2. #2
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    111
    Thanked 4 Times in 4 Posts

    Default Re: Weird application crash

    I've switched to QStandardItemModel, you saw it in the header file!!

    And the order list simply cannot be redundant because I need it in other parts of project. So I cannot have QStandardModel with this list or what now?!
    Qt 5.3 Opensource & Creator 3.1.2

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

    Default Re: Weird application crash

    Quote Originally Posted by MarkoSan View Post
    I've switched to QStandardItemModel, you saw it in the header file!!
    No, you didn't. You subclassed the model (and did it incorrectly) and not used it.

    And the order list simply cannot be redundant because I need it in other parts of project. So I cannot have QStandardModel with this list or what now?!
    I don't know what can or can't be. I know all the functionality of your list is already in the standard item model. So either don't use the list or don't use QStandardItemModel. A proper approach is to get rid of QStandardItemModel, but it's more work to implement your own model instead of using the standard one.

Similar Threads

  1. QSkinWindows Classes
    By kernel_panic in forum Qt-based Software
    Replies: 45
    Last Post: 20th April 2010, 12:35
  2. dll + application
    By fpujol in forum Qt Programming
    Replies: 11
    Last Post: 15th April 2007, 18:37
  3. Weird crash caused by a QTreeView
    By vfernandez in forum Qt Programming
    Replies: 1
    Last Post: 10th September 2006, 18:31
  4. Gnome makes application crash
    By regix in forum Qt Programming
    Replies: 35
    Last Post: 18th August 2006, 19:44
  5. Replies: 5
    Last Post: 24th April 2006, 15:42

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.