Results 1 to 1 of 1

Thread: Unhandled Exception in QTableView->setModel(QSqlTableModel)

  1. #1
    Join Date
    Dec 2007
    Posts
    16
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Unhandled Exception in QTableView->setModel(QSqlTableModel)

    Windows, Qt Creator 1.0.0, Qt 4.5.0

    I'm creating a little SQL input form. In the main window constructor, I create a QSqlTableModel and when I try to associate it with a QTableView created in QDesigner I get the runtime error:

    Unhandled exception at 0x00f8a5be in Forecast1.exe: 0xC0000005: Access violation reading location 0x00000004

    The arrow in the following code is where it is occurring.

    mainwindow.cpp

    In running in the debugger traces it to the lines below, at (in qwidget.h line 144):

    QWidgetPrivate *pd = parent->d_func();

    is where it happens, when I step a message displayed is: ' stopped: "signal received" ' and the debugger will not go beyond the "Q_DECLARE_PRIVATE(QWidget)" line in the last section.

    Unhandled exception.cpp

    Thanks,
    Doug

    P.S., let me know if it would be better to paste the code in here instead of having them as attachments.
    Last edited by dougbroadwell; 19th March 2009 at 20:39. Reason: updated contents

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 10:49
  2. Replies: 3
    Last Post: 27th January 2009, 10:31
  3. Exception type loss
    By azdruid in forum Qt Programming
    Replies: 3
    Last Post: 6th November 2007, 21:06
  4. Unhandled Exception Err
    By Masih in forum Newbie
    Replies: 9
    Last Post: 25th July 2007, 21:28
  5. Multi-line messages in QTableView
    By Conel in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 14:49

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.