changing inheritance for the view class
Christian Nitschkowski
segfault_ii at web.de
Mon Nov 11 16:44:47 GMT 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 11 November 2002 16:27, you wrote:
> What is the best way to program a KDE-Normal or KDE-MDI project so that the
> main view corresponds to the QT-Designer dialog I create? I save the .ui
> file in my project directory. It compiles properly into header and
> implementation files. I change the inheritance of my view class to the new
> class created from the .ui file, but I still get a bare-bones GUI when the
> project compiles and runs. What am I missing? When I go through this
> procedure with a KDE-Mini project, it works as I expect. Thanks...
>
> Scott
Hmm.
I'm not sure, because I'm developing my first K-app with a KMainWindow, and I
don't use the QT-Designer anymore.
But I'd guess, you'll have to design your widget, inherit an implementation
class from it, and include an instance of your implementation class in the
KMainWindow.
For example:
Class foo was designed with QT-Designer.
Now create
class bar : public foo{
// some nasty stuff
};
And in your
class window : public KMainWindow{
// ...
private:
bar* mainWgt;
};
And in
window::window(QWidget* parent, char* name) : KMainWindow(parent, name){
mainWgt = new bar(this);
setCentralWidget(mainWgt);
}
Hope that helps
Regards
Christian Nitschkowski
- --
Visit my homepage at http://segfaultskde.berlios.de for different KDE-Apps.
If builders built buildings the way programmers wrote programs, then the first
woodpecker that came along would destroy civilization.
Murphy's Law
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9z96Gb/QSzFL/HQkRAozvAJ9A4DmL+WjdqRrDwcFBxQ0+dkKmuQCfU0t8
87ZOSNeQ8k2yIS4oLQcG5Rk=
=19Ni
-----END PGP SIGNATURE-----
-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop
mailing list