alan
3rd May 2008, 00:35
Sorry for a question with an obvious (?) answer (seems not to be asked so far).
I would like to create a program based on QMainWindow and have created a quite complex QWidget in Qt-Designer (Qt4) which I would now like to set as the CentralWidget in the QMainWindow.
I'm using the ui.setup approach, but this gives me always the error, that a 'Ui::Xy&' is not a 'QWidget*': & != * .
Can somebody point to a simple example where a *.ui file is used to create the CentralWidget of a QMainWIndow, please?
The Qt4 example about QMainWindow does not do it for me...
Or is the correct approach to create this main widget as a QMainWindow instead of a QWidget?
(But what would then be the CentralWidget?)
(I use cmake rather than qmake, but this should not make any difference, I assume.)
The widget to be used as the CentralWidget compiles OK, so far I managed to see it outside of the QMainWindow. :rolleyes:
Help is much appreciated.
Helge
P.S.: Using Qt 4.4.0-rc1-5 on debian sid amd64, if that matters.
I would like to create a program based on QMainWindow and have created a quite complex QWidget in Qt-Designer (Qt4) which I would now like to set as the CentralWidget in the QMainWindow.
I'm using the ui.setup approach, but this gives me always the error, that a 'Ui::Xy&' is not a 'QWidget*': & != * .
Can somebody point to a simple example where a *.ui file is used to create the CentralWidget of a QMainWIndow, please?
The Qt4 example about QMainWindow does not do it for me...
Or is the correct approach to create this main widget as a QMainWindow instead of a QWidget?
(But what would then be the CentralWidget?)
(I use cmake rather than qmake, but this should not make any difference, I assume.)
The widget to be used as the CentralWidget compiles OK, so far I managed to see it outside of the QMainWindow. :rolleyes:
Help is much appreciated.
Helge
P.S.: Using Qt 4.4.0-rc1-5 on debian sid amd64, if that matters.