From: Richard Dale Date: 2004-09-09T18:25:04+09:00 Subject: Re: [ANN] Korundum 3.3.1 beta vruz wrote: > Do we have QWidgetFactory in the new release ? No, not for this release. I did work out how to use QWidgetFactory with QtRuby, but I thought it was more trouble than it was worth. Perhaps that was wrong, but it seemed more powerful to read in some ruby code at runtime for a UI, generated by the rbuic tool, than read some xml in a .ui file. > The Qt 3.3 docs mention something about some headers needed, this is > powerful stuff, It'd be nice to have. > http://doc.trolltech.com/3.3/qwidgetfactory.html > > I would like to do something like the following, but in ruby: > .................... > void MainForm::creditDialog() > { > QDialog *creditForm = (QDialog *) > QWidgetFactory::create( "../credit/creditformbase.ui" ); > // Set up the dynamic dialog here > > if ( creditForm->exec() ) { > // The user accepted, act accordingly > QSpinBox *amount = (QSpinBox *) creditForm->child( > "amountSpinBox", "QSpinBox" ); > if ( amount ) > ratingTextLabel->setText( amount->text() ); > } > delete creditForm; > } > .............. > > cheers ! > >