Hello,

Trying to show a QDialog, but I am getting the errors shown.
What am I doing wrong?

Regards

Qt Code:
  1. Header
  2. #ifndef QG_DIVIDEOPTIONS_H
  3. #define QG_DIVIDEOPTIONS_H
  4.  
  5. #include <QDialog>
  6.  
  7. namespace Ui {
  8. class qg_divideoptions;
  9. }
  10.  
  11. class qg_divideoptions : public QDialog
  12. {
  13. Q_OBJECT
  14.  
  15. public:
  16. explicit qg_divideoptions(QWidget *parent = 0);
  17. ~qg_divideoptions;
  18.  
  19. private:
  20. Ui::qg_divideoptions *ui;
  21.  
  22. };
  23. #endif // QG_DIVIDEOPTIONS_H
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. qg_divideoptions.cpp
  2. #include <QtGui>
  3. #include "qg_divideoptions.h"
  4.  
  5. qg_divideoptions::qg_divideoptions(QWidget *parent) : //*** qg_divideoptions does not name a type
  6. QDialog(parent),
  7. ui(new Ui::qg_divideoptions)
  8. {
  9. ui->setupUi(this);
  10. }
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. Calling function header
  2. public:
  3. QDialog* mydialog;
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. Calling function
  2. #include "qg_divideoptions.h"
  3. #include <QDialog>
  4.  
  5. void myfunc::mouseReleaseEvent(QMouseEvent* e) {
  6. if (e->button() == Qt::LeftButton) {
  7. qg_divideoptions mydialog = new qg_pdivideoptions(); //*** qg_divideoptions was not declared in this scope
  8. mydialog->show(); //*** mydialog was not declared in this scope
  9. }
  10. }
To copy to clipboard, switch view to plain text mode