changing inheritance for the view class

Scott Dreher dreher at aniakchak.indstate.edu
Tue Nov 12 17:39:26 GMT 2002


OK, I figured out my problem...when creating my Designer file, I was selecting 
"dialog" as my file type. I tried again, only selecting "widget" as the file 
type, it works as expected....

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+

-- 
Scott T. Dreher
Department of Geography, Geology, and Anthropology
Indiana State University
Terre Haute, IN 47809
voice: (812) 237-2362
fax: (812) 237-8029

-
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