Results 1 to 4 of 4

Thread: problem in subclassing QTable

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: problem in subclassing QTable

    There's no error at or before line 16. There is an obvious error at line 58 that causes an error message at line 59: what is QTable and where is it defined? There's no doubt.

    In future it helps if you post the actual code that generated the error so that the line numbers are meaningful, or adjust the error message to match the line numbers the forum gives a snippet.

  2. #2
    Join Date
    Oct 2011
    Posts
    160
    Thanks
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: problem in subclassing QTable

    Thank u Chris for reply...ya as u pointed out, the error was at 59, where the declaration
    Qt Code:
    1. class Table : public QTable
    2. {
    3. Q_OBJECT.
    4. .
    5. .
    To copy to clipboard, switch view to plain text mode 

    what should i do for this?
    Please hav a look at this...http://doc.qt.nokia.com/qq/qq07-big-tables.html
    i just copied code from there...my requirement as they specified i wanted to load big files in table
    Last edited by aurora; 2nd March 2012 at 05:05.

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: problem in subclassing QTable

    QTable is part of Qt 3, not Qt4. Its closest Qt4 equivalent is QTableView, but the API is different. The equivalent Qt4 approach to reading your TSV files would be to subclass QAbstractTableModel, the details of which are covered in the Model/View Programming docs.

Similar Threads

  1. Problem Subclassing Calendar
    By Archa4 in forum Newbie
    Replies: 7
    Last Post: 9th March 2011, 11:50
  2. Subclassing QSortFilterProxyModel problem
    By e79ene in forum Newbie
    Replies: 2
    Last Post: 21st February 2011, 13:23
  3. Subclassing QMainWindow problem
    By lerwys in forum Qt Programming
    Replies: 7
    Last Post: 28th April 2009, 08:40
  4. Problem in SubClassing QTableItem.
    By sumsin in forum Qt Programming
    Replies: 3
    Last Post: 22nd May 2006, 10:21
  5. Problem with QTable
    By zlatko in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2006, 10:00

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.