Hi there, folks!!
I have a bit of a problem here with being able to declare an object from a class derived from a UI file designed with Qt Designer, in other words:
in adddialog.h,
Code:
#ifndef ADDDIALOG_H #define ADDDIALOG_H #include "ui_adddialog.h" Q_OBJECT public: adddialog (); }; #endif // ADDDIALOG_H
in adddialog.cpp,
Code:
#include "adddialog.h" adddialog::adddialog() { setupUi(this); }
and in the implementation of the main window,
Code:
#include "adddialog.h" ... void mainwindow::adddialog() { adddialog add; add.show(); }
void adddialog in the class mainwindow is a slot, later used to connect a button to it, and hence make an "Add Dialog" launch whenever the button is clicked.
When I run this code I get the following errors:
"expected ; before 'add' "
"statement cannot resolve address of overloaded function"
" 'add' was not declared in this scope"
What am I doing wrong??? As usual sample code would be very appreaciated.
Thanks in advance