Results 1 to 4 of 4

Thread: problem with QDataTable

  1. #1
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default problem with QDataTable

    HI all
    I create QDataTable obj from designer,so i select needed correct connection and table that i want to see. But after showing this widget i have next message in console
    QSqlCursor::setName: unable to build record, does 'departments' exist?
    My answer - yes it exist....data table wizard give me this table in db tables list....
    Where is my problem?
    a life without programming is like an empty bottle

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem with QDataTable

    Where do you show that widget? In the Designer?

  3. #3
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: problem with QDataTable

    Qt Code:
    1. #include <qapplication.h>
    2. #include "inc/qformeditobjbase.h"
    3.  
    4. int main( int argc, char ** argv )
    5. {
    6. QApplication a( argc, argv );
    7.  
    8. // widget with one data table
    9. QFormEditObjBase frmObjEditBase;
    10. a.setMainWidget(&frmObjEditBase);
    11. frmObjEditBase.show();
    12.  
    13. a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
    14. return a.exec();
    15. }
    To copy to clipboard, switch view to plain text mode 
    a life without programming is like an empty bottle

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem with QDataTable

    You must connect to the database yourself. Connections that you define in Qt Designer are only used internally --- they aren't stored in a .ui file.

  5. The following user says thank you to jacek for this useful post:

    zlatko (26th April 2006)

Similar Threads

  1. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  2. qdatatable problem..
    By triperzonak in forum Qt Programming
    Replies: 1
    Last Post: 28th July 2008, 14:50
  3. QDataTable problem
    By ederbs in forum Qt Programming
    Replies: 12
    Last Post: 8th February 2007, 23:47
  4. QDataTable problem in the order
    By cristiano in forum Qt Programming
    Replies: 3
    Last Post: 22nd January 2007, 22:58
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.