Results 1 to 4 of 4

Thread: QTable gives error when put on a dialog??

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Posts
    47
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11
    Thanks
    2

    Default Re: QTable gives error when put on a dialog??

    I had done nothing in my project , I only take a qtable widget on a dialog.
    I am attaching my project , Plz check table.zip.


    Thanks and Regards
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2006
    Location
    Mexico City
    Posts
    31
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Re: QTable gives error when put on a dialog??

    Hi, darpan

    I think I know what's going on. In your project there are two versions of form1.h.

    One is in dir .ui, the other in the main directory. The one in the .ui directory do not have the line:
    #include <qtable.h>

    but file form1.h in main directory, include's qtable.h.

    Maybe the way you are compiling your projet is using the one without the <qtable.h> include. I can't check this because i'm ussing Qt 3.3.4, and this version generates files with qtable.h included automatically.

    But if I modify all source files that include qtable.h and run make without running qmake, I get an error similar to the one you get:

    g++ -c -pipe -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -g -Wall -W -O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -g -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/usr/lib/qt3/mkspecs/default -I. -I. -I/usr/include -I/usr/lib/qt3/include -o form1.o form1.cpp
    form1.cpp: In constructor `Form1::Form1(QWidget*, const char*, bool, unsigned int)':
    form1.cpp:33: error: invalid use of undefined type `struct QTable'
    form1.h:21: error: forward declaration of `struct QTable'
    form1.cpp:34: error: `setGeometry' undeclared (first use this function)
    form1.cpp:34: error: (Each undeclared identifier is reported only once for each function it appears in.)
    form1.cpp:35: error: `setNumRows' undeclared (first use this function)
    form1.cpp:36: error: `setNumCols' undeclared (first use this function)
    make: *** [form1.o] Error 1

    I hope this can be of some help.

Similar Threads

  1. Replies: 3
    Last Post: 23rd July 2006, 18:02
  2. Show/hide part of dialog with resizing.
    By Spockmeat in forum Qt Tools
    Replies: 6
    Last Post: 7th June 2006, 08:22
  3. Dialog positioning in GNOME
    By simk in forum Qt Programming
    Replies: 2
    Last Post: 16th March 2006, 09:41
  4. QTable..Vs.. QListView
    By :db:sStrong in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2006, 21:03
  5. Shape-changing dialog with qt4.1
    By moe in forum Qt Tools
    Replies: 3
    Last Post: 2nd February 2006, 10:12

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.