Mailinglist Archive: opensuse-programming (84 mails)

< Previous Next >
Re: [suse-programming-e] QDataBrowser can not display bpchar(150)
  • From: Brad Bourn <brad@xxxxxxxxxxxx>
  • Date: Thu, 5 Aug 2004 07:52:56 -0600
  • Message-id: <200408050752.56330.brad@xxxxxxxxxxxx>
hmmm

sorry, I don't know what to tell you.


I haven't played with it in a while. I also do most things directly in C++
and as little as possible with the designer.


I would try a Qt specific group or list if you don't have paid support.


I wish I knew the answer.


B-)


P.S. You might want to try changing the datatype in either the database field
or the lineedit if possible. I simply don't remember


On Thursday 05 August 2004 02:07 am, Prabu Subroto wrote:
> 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@xxxxxxxxxxxx> 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.
> >
> > On Wednesday 04 August 2004 11:49 am, you wrote:
> > > 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@xxxxxxxxxxxx> 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.
> > > >
> > > > > http://messenger.yahoo.com
> > > >
> > > > --
> > > > To unsubscribe, email:
> > > > suse-programming-e-unsubscribe@xxxxxxxx
> > > > For additional commands, email:
> > > > suse-programming-e-help@xxxxxxxx
> > > > Archives can be found at:
> > > > http://lists.suse.com/archive/suse-programming-e
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Mail - 50x more storage than other
> >
> > providers!
> >
> > > http://promotions.yahoo.com/new_mail
>
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - Send 10MB messages!
> http://promotions.yahoo.com/new_mail

< Previous Next >
References