Hi Brad... I am so confused because the QLineEdit was defined by the Qt Designer. I create the QDataBrowser from Qt Designer and the QDataBrowser generate the QLineEdit by themselves. I try to define this line " QLineEditCompany = custdataBrowser->field("custid").QString(); " in the constructor ( init() ) but of course if I click the button of "next"/"last"/"previos"/"first" than the content of "company" field will not be displayed anymore. Please tell me your solution. Please.... Thank you very much. ==== void funonseqForm::init() { 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); custdataBrowser->setSqlCursor(cursor, false); QLineEditCompany = custdataBrowser->field("custid").QString(); custdataBrowser->refresh(); } --- Brad Bourn <brad@summitrd.com> wrote:
been a while since I played with this stuff....
I know there is a way to reference the var as a QString...
where is the actual data stored?
like where do you try to fill in the lineedit?
databrowser->fieldname ?
if so, should be something like
linedit = databrowser->field("fieldname").QString()
B-)
If you give me the exact syntax where you set the lineedit var, I'll probably remember.
Dear Brad...
But how?
here is my code:
void funonseqForm::init() { 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); custdataBrowser->setSqlCursor(cursor, false); custdataBrowser->refresh();
}
Thank you very much in advance
--- Brad Bourn <brad@summitrd.com> wrote:
You should be able to set it to QString
B-)
On Wednesday 04 August 2004 11:41 am, Prabu Subroto
wrote:
Dear my friends...
I am using postgres 7.2.x, Qt 3.2 and SuSE 9.1 .
I want to make the list of customer list with "previous", "next", "first" and "last" buttons.
Finally, I create this with QDataBrowser. Actually it works...the four buttons work as I expected. but what weird is that the QLineEdit of Address can not display the value of the field "address". I define this field with bpchar(150).
Does
it has anything to do with the datatype? Which data type should I use?
Please tell me where my mistake is.
Thank you very much.
Do you Yahoo!? Y! Messenger - Communicate in real time. Download
now.
-- To unsubscribe, email: suse-programming-e-unsubscribe@suse.com For additional commands, email: suse-programming-e-help@suse.com Archives can be found at: http://lists.suse.com/archive/suse-programming-e
Do you Yahoo!? Yahoo! Mail - 50x more storage than other
On Wednesday 04 August 2004 11:49 am, you wrote: providers!
__________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail