dayrinni
2nd September 2006, 04:29
Hello, I am writing a qt program in VS 6.0.
I have a window with a button on it. When the button is pressed it will create a file dialog box. I have placed the window and wrote the code to hopefully do this. I have the class that contains the slot.
class Panel : public QWidget
{
public:
Panel(QWidget *parent = 0, QObject *app = 0);
...methods
private slots:
void openFieldDialog();
private:
...variables
};
Here is the code for the slot:
void Panel::openFieldDialog()
{
...code
}
Here is the line where I use the connect for it:
QPushButton *loadFile = new QPushButton("Load File", mainFrame);
//this = Panel
QObject::connect(loadFile, SIGNAL(clicked()), this, SLOT(Panel::openFieldDialog()));
I then compile and build in VS 6.0 and run the program. Nothing happens when I click on the button and on the console window that appears this is seen (it is present before I click):
Object::connect: No such slot QWidget::Panel::openFieldDialog()
I have tried numerous other things, such as openFieldDialog() instead of Panel::..., etc.
Any ideas?
Thank you!!
PS:
Also is there a way to get qmake to work with the makefile for VS 6.0? I'd rather to have all of my compiling done with 1 thing.
I have a window with a button on it. When the button is pressed it will create a file dialog box. I have placed the window and wrote the code to hopefully do this. I have the class that contains the slot.
class Panel : public QWidget
{
public:
Panel(QWidget *parent = 0, QObject *app = 0);
...methods
private slots:
void openFieldDialog();
private:
...variables
};
Here is the code for the slot:
void Panel::openFieldDialog()
{
...code
}
Here is the line where I use the connect for it:
QPushButton *loadFile = new QPushButton("Load File", mainFrame);
//this = Panel
QObject::connect(loadFile, SIGNAL(clicked()), this, SLOT(Panel::openFieldDialog()));
I then compile and build in VS 6.0 and run the program. Nothing happens when I click on the button and on the console window that appears this is seen (it is present before I click):
Object::connect: No such slot QWidget::Panel::openFieldDialog()
I have tried numerous other things, such as openFieldDialog() instead of Panel::..., etc.
Any ideas?
Thank you!!
PS:
Also is there a way to get qmake to work with the makefile for VS 6.0? I'd rather to have all of my compiling done with 1 thing.