Results 1 to 2 of 2

Thread: [Qt 4.1] Strange behaviour with QTableView

  1. #1
    Join Date
    Jan 2006
    Location
    Iasi, Romania
    Posts
    10
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default [Qt 4.1] Strange behaviour with QTableView

    I have encountered a strange behaviour when using a QTableView (not happening for QLIstView). I have attached sample code along with a .sql file with data structure and sample data (change the MySQL root password in main.cpp). To reproduce the "error":
    1. Run the program and click on a city in the left listview. This should filter the customers in the right tableview by that city.
    2. Select one of the customers in the right tableview
    3. Click on one of the last three cities in the left listview ("Iasi", "Vaslui" or "Belcesti" - these cities do not have any customer belonging to them - if you follow my example).

    At this point the interface becomes nonresponsive (at least this happens to me). Clicking on a city that has corresponding customers do not expose this behaviour. If you skip step 2 from above, clicking on any of the cities in left listview does what is expecting to do - filter the customers.

    Now uncomment line #34 from mainwindow.cpp (the one with the QMessageBox), build and run again. This time the behaviour(GUI freezing) do not appear even if you don't skip step 2.

    I tried to connect to different signals in order to avoid the behaviour. I also tried changing the QTableModel which fills the tableview to QSqlQueryModel or QSqlRelationalTableModel but with the same result - GUI freezing.

    This behaviour do not exhibit if I use a QListView to the right side of the form (to display customers) but this is not what I need in my application.

    The backtrace before the interface freezes is like this (don't know what all that mean but maybe it is usefull):
    #0 0x100e87e0 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (kernel/qobject.cpp:2710)
    #1 0x009e4e6c ?? (??:??)
    #2 0x009dbc6f ?? (??:??)
    #3 0x009efbe9 ?? (??:??)
    #4 0x0069ec2d ?? (??:??)
    #5 0x008e5b10 ?? (??:??)
    #6 0x009755e0 ?? (??:??)
    #7 0x009da913 ?? (??:??)
    #8 0x00aa0f4c ?? (??:??)
    #9 0x00973dd7 ?? (??:??)
    #10 0x006558e5 ?? (??:??)
    #11 0x00654468 ?? (??:??)
    #12 0x00a83b8d ?? (??:??)
    #13 0x006ae8ab ?? (??:??)
    #14 0x006aa0c7 ?? (??:??)
    #15 0x77d48709 _libkernel32_a_iname (??:??)
    #16 0x77d487eb _libkernel32_a_iname (??:??)
    #17 0x77d489a5 _libkernel32_a_iname (??:??)
    #18 0x77d489e8 _libkernel32_a_iname (??:??)
    #19 0x100f994e QPainterPrivate::updateEmulationSpecifier(QPainter State*) (kernel/qeventdispatcher_win.cpp:443)
    #20 0x006a8a0c ?? (??:??)
    #21 0x100ceee8 QEventLoop:rocessEvents(QFlags<QEventLoop::ProcessEventsFlag> ) (kernel/qeventloop.cpp:118)
    #22 0x100cefc7 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsF lag>) (kernel/qeventloop.cpp:158)
    #23 0x100d2b90 QCoreApplication::exec() (kernel/qcoreapplication.cpp:661)
    #24 0x00653a70 ?? (??:??)
    #25 0x004018e3 qMain(int, char**) (main.cpp:22)
    #26 0x00402f0f WinMain (qtmain_win.cpp:105)
    #27 0x00402a9a main (??:??)

    Thank you in advance for any advice.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Iasi, Romania
    Posts
    10
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Qt 4.1] Strange behaviour with QTableView

    Does anybody have an idea?

Similar Threads

  1. Strange xml behaviour when opening the file.
    By cbarmpar in forum Qt Programming
    Replies: 5
    Last Post: 28th September 2008, 20:44
  2. Very strange (perhaps) QHttp behaviour.
    By Kumosan in forum Qt Programming
    Replies: 5
    Last Post: 11th June 2008, 07:03
  3. qinputdialog strange behaviour
    By dreamer in forum Qt Programming
    Replies: 1
    Last Post: 11th May 2008, 19:29
  4. very strange behaviour
    By regix in forum Qt Programming
    Replies: 23
    Last Post: 20th July 2006, 17:38
  5. Replies: 1
    Last Post: 26th February 2006, 05:52

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.