Re: Virtual class as a QWidget interface and dependency inversion principle.
you can just forward declare the classes and you can still connect signals slots I think.
Also, I'm not sure about your idea of dependency inversion - The method is to make the higher level class dependant on the abstraction - IStorage. So there is no problem with mainwindow being dependant up on it, because it is an abstraction.
Last edited by amleto; 18th November 2011 at 21:39.
If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.
Bookmarks