#include <QApplication>
#include <QMessageBox>
#include <QWidget>
////////////////////////////////////////
Q_OBJECT
public:
public slots:
signals:
};
class A {
int a;
double b;
public:
A(int _a = 0, double _b = 0.0);
};
////////////////////////////////////////
///// ===== main function ====
int main(int argc, char* argv[]) {
return app.exec();
}
///// ===== end of main ======
///// MyWindow //////////////////////////
MyWindow
::MyWindow(QWidget* parent
) // Create Layout, actions, menus, etc.
A object_A(10,20.5);
}
///// End of MyWindow ///////////////////
///// A /////////////////////////////////
A::A(int _a, double _b) : a(_a), b(_b) {
// Some problems here and information need to be shown:
this,
tr("Title"),
tr("Information to be shown"));
}
///// End of A //////////////////////////
#include <QApplication>
#include <QMessageBox>
#include <QWidget>
////////////////////////////////////////
class MyWindow : public QWidget {
Q_OBJECT
public:
MyWindow(QWidget* parent = 0);
public slots:
signals:
};
class A {
int a;
double b;
public:
A(int _a = 0, double _b = 0.0);
};
////////////////////////////////////////
///// ===== main function ====
int main(int argc, char* argv[]) {
QApplication app(argc,argv);
return app.exec();
}
///// ===== end of main ======
///// MyWindow //////////////////////////
MyWindow::MyWindow(QWidget* parent)
: QWidget(parent) {
// Create Layout, actions, menus, etc.
A object_A(10,20.5);
}
///// End of MyWindow ///////////////////
///// A /////////////////////////////////
A::A(int _a, double _b) : a(_a), b(_b) {
// Some problems here and information need to be shown:
QMessageBox::information(
this,
tr("Title"),
tr("Information to be shown"));
}
///// End of A //////////////////////////
To copy to clipboard, switch view to plain text mode
Bookmarks