sir,
I have modified my code like this:
{
//some other lines of code
QObject::connect(but,
SIGNAL(clicked
()),
this,
SLOT(findbox
()));
//remaining program
}
void CPT::findbox()
{
//other widgets added to it
//fwin->show();
static fwin *form2 = new fwin(this);
form2->show();
form2->activateWindow(); // or form2->setActiveWindow() in Qt3
form2->raise();
}
CPT::CPT(QWidget *parent):QWidget(parent)
{
//some other lines of code
QPushButton *but=new QPushButton(this);
QObject::connect(but,SIGNAL(clicked()),this,SLOT(findbox()));
//remaining program
}
void CPT::findbox()
{
QWidget *fwin=new QWidget;
//other widgets added to it
//fwin->show();
static fwin *form2 = new fwin(this);
form2->show();
form2->activateWindow(); // or form2->setActiveWindow() in Qt3
form2->raise();
}
To copy to clipboard, switch view to plain text mode
And I got the following errors:
"cptdebug.cpp", line 1501: Error: fwin, of type int, was previously declared QWidget*.
"cptdebug.cpp", line 1501: Error: Multiple declaration for fwin.
"cptdebug.cpp", line 1501: Error: "," expected instead of "*".
"cptdebug.cpp", line 1502: Error: form2 is not defined.
"cptdebug.cpp", line 1503: Error: form2 is not defined.
"cptdebug.cpp", line 1504: Error: form2 is not defined.
Kindly tell me why? And give me the possible solution.
Thanks and regards,
Sarma.
Bookmarks