How to move the definitions from mainwindow.cpp to mainwindow.h?
-
wrote on 10 Feb 2021, 07:45 last edited by BoboFuego 2 Oct 2021, 07:45
I want to define the
class MainWindow
as a template class, but I cannot move the definitions of its functions tomainwindow.h
because of the forward declaration ofnamespace Ui { class MainWindow; }
. How to achieve such a thing? Appreciate any help or suggestions -
Find a different approach. QObject classes cannot be templated, so it won't work even if you solve
namespace Ui
problem. -
Find a different approach. QObject classes cannot be templated, so it won't work even if you solve
namespace Ui
problem.wrote on 10 Feb 2021, 08:07 last edited by@sierdzio said in How to move the definitions from mainwindow.cpp to mainwindow.h?:
QObject classes cannot be templated
Could you say a few more words about this, please?
-
@sierdzio said in How to move the definitions from mainwindow.cpp to mainwindow.h?:
QObject classes cannot be templated
Could you say a few more words about this, please?
2/4