Mailinglist Archive: opensuse-programming (84 mails)

< Previous Next >
Moving from current record to the previous or next record.
  • From: Prabu Subroto <prabu_subroto@xxxxxxxxx>
  • Date: Wed, 4 Aug 2004 08:27:16 -0700 (PDT)
  • Message-id: <20040804152716.50039.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
Dear my friends...

I am using Qt, postgres and SuSE 9.1.

I want to make 2 buttons, one is for moving to the
previous record and one is for moving to the next
record.

but I find error message in compiling process:
"
patrixlinux@patrix:~/arsip/proyek/qt/kv/client> make
g++ -c -pipe -O2 -march=i586 -mcpu=i686
-fmessage-length=0 -Wall -fPIC -Wall -W -O2
-march=i586 -mcpu=i686 -fmessage-length=0 -Wall -fPIC
-D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT
-DQT_SHARED -DQT_TABLET_SUPPORT
-I/usr/lib/qt3/mkspecs/default -I. -I/usr/include
-I/usr/lib/qt3/include -I.ui/ -I. -I.moc/ -o
.obj/funonseqform.o .ui/funonseqform.cpp
In file included from .ui/funonseqform.cpp:28:
funonseqform.ui.h: In member function `virtual void
funonseqForm::prevSlot()':
funonseqform.ui.h:68: error: request for member `prev'
in `this->cursor', which is of non-aggregate type
`<unknown type>'
funonseqform.ui.h: In member function `virtual void
funonseqForm::nextSlot()':
funonseqform.ui.h:74: error: request for member `next'
in `this->cursor', which is of non-aggregate type
`<unknown type>'
make: *** [.obj/funonseqform.o] Error 1
patrixlinux@patrix:~/arsip/proyek/qt/kv/client>
"

Anybody would be so nice to tell me how to make them
work?

Thank you very much in advance.

=====
Here is my code
=====
void funonseqForm::init()
{
custdataTable->setNumRows(1);
retrieve();
}

void funonseqForm::retrieve()
{
QSqlDatabase * bd =
QSqlDatabase::addDatabase("QPSQL7", "OTHER");
bd->setHostName("192.168.23.237");
bd->setDatabaseName("kv");
bd->setUserName("postgres");
bd->setPassword("");
if ( ! bd->open() )
{
bd->lastError().showMessage();
}

QSqlCursor * cursor = new
QSqlCursor("v_cust_sven", true, bd);
custdataTable->setSqlCursor(cursor, true, false);
custdataTable->refresh();

}

void funonseqForm::prevSlot()
{
cursor.prev();
}


void funonseqForm::nextSlot()
{
cursor.next();
}




__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail

< Previous Next >
This Thread
  • No further messages