agnus
18th November 2009, 21:23
Hello, I have this class:
class MyWindow : public QMainWindow {
Q_OBJECT
public:
MyWindow();
signals:
void aspectRatioChange(AspectRatio aspectRatio);
private slots:
void setAspectRatio(QAction* action);
private:
struct Impl;
std::auto_ptr<Impl> imp;
};
which works alright as it is. I would like to know if I could get rid of that setAspectRatio() private slot somehow by using an "anonymous" function (callback?) in the QObject::connect() statement. My goal is to reduce as much possible the implementation details from my header files.
Thank you
class MyWindow : public QMainWindow {
Q_OBJECT
public:
MyWindow();
signals:
void aspectRatioChange(AspectRatio aspectRatio);
private slots:
void setAspectRatio(QAction* action);
private:
struct Impl;
std::auto_ptr<Impl> imp;
};
which works alright as it is. I would like to know if I could get rid of that setAspectRatio() private slot somehow by using an "anonymous" function (callback?) in the QObject::connect() statement. My goal is to reduce as much possible the implementation details from my header files.
Thank you