[SOLVED] Class does not name a type
Hi, can someone please help to look at this, I'm baffled as I did the same thing for two items and it worked for one but not the other. When I try to compile i get "RadioWindow does not name a type'
I have a Find window which will call Report and Radio window. It can open the Report window but not the Radio window.
RadioWindow *radiowindow_rf; //error RadioWindows does not name a type
radiowindow_rf =new RadioWindow(this);
radiowindow_rf->setWindowTitle("Radio - User Configuration Manager");
report_rf =new Reportwindow(this);
report_rf->setWindowTitle("Radio - User Configuration Manager");
I also have a form called radiowindow.h and radiowindow.cpp that calls Find window implemented with the same method, not sure if this would conflict it
RadioWindow::RadioWindow(QWidget *parent) :
find_r->setWindowTitle("Radio - User Configuration Manager");
You have a circural dependency: RadioWindow includes FindForm, and FindForm includes RadioWindow. You need to restructure your code.
do you have any idea how I should restructure it ? :(
you see, the problem is, i call those windows via the menu like New (will call Radio Window), Find (will call Find window)
Here is a nice summary: "link":http://stackoverflow.com/questions/625799/resolve-circular-dependencies-in-c.
Or you can delegate opeing of FindWindow to MainWindow, and only emit a signal to do it from RadioWindow.
thanks, i will look into it!
Thank you sierdzio, the problem has been solved :)
I'm happy to haer that. Have fun!