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.
{
public:
...methods
private slots:
void openFieldDialog();
private:
...variables
};
class Panel : public QWidget
{
public:
Panel(QWidget *parent = 0, QObject *app = 0);
...methods
private slots:
void openFieldDialog();
private:
...variables
};
To copy to clipboard, switch view to plain text mode
Here is the code for the slot:
void Panel::openFieldDialog()
{
...code
}
void Panel::openFieldDialog()
{
...code
}
To copy to clipboard, switch view to plain text mode
Here is the line where I use the connect for it:
//this = Panel
QObject::connect(loadFile,
SIGNAL(clicked
()),
this,
SLOT(Panel
::openFieldDialog()));
QPushButton *loadFile = new QPushButton("Load File", mainFrame);
//this = Panel
QObject::connect(loadFile, SIGNAL(clicked()), this, SLOT(Panel::openFieldDialog()));
To copy to clipboard, switch view to plain text mode
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:penFieldDialog()
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.
Bookmarks