kdevelop/Designer code unreachable
Phil
phil at spiderweb.com.au
Tue Jan 16 20:38:14 GMT 2001
Hello again,
I'm sorry that I have to post again on this subject. I thought I had the
answer, but as it turns out not quite.
The piece of code in myclass.cpp (see below) is unreachable. I think the
reason is because I don't have a signal/slot connection. Although this may
also be inherited from the form1 class; I'm just not sure.
It could be that I have not constructed myclass correctly to inherit the
form1 class entirely. Also, it might be a bit hard to see just what I'm
trying to do. A button on the dialog is suppose to activate the slot
stepUp(), but it doesn't.
test.h and test.cpp are the files produced by kdevelop.
dial.h and dial.cpp are the files produced by Designer. Dial.cpp contains the
signal/slot connections. There are two buttons, the cancel button works.
myclass.h is my attempt to inherit the form1 class.
#ifndef MYCLASS_H
#define MYCLASS_H
#include "dial.h"
class myClass : public Form1
{
Q_OBJECT
public:
myClass( QWidget* parent = 0, const char* name = 0,
bool modal = FALSE, WFlags f = 0 ) :
Form1( parent, name, modal, f ) {}
~myClass();
public slots:
virtual void stepUp();
};
This is myclass.cpp where I expect the stepUp() slot to be activated by the
press button.
#include "myclass.h"
/*
Commenting out the constructor and destructor code makes the code compile
correctly
and display the dialog correctly.
myClass::myClass( QWidget* parent, const char* name,
bool modal, WFlags f ) :
Form1( parent, name, modal, f )
{
}
myClass::~myClass()
{
}
*/
void myClass::stepUp()
{
The code here is not reachable.
}
#endif
--
Regards,
Phil
phil at spiderweb.com.au
-
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