How to add a custom widget manually(in code) to QMainWindow
General and Desktop
5
Posts
3
Posters
6.6k
Views
1
Watching
-
Hi. I have run into a probleam that I can't add my custom widget manually to QMainWindow.
I originally designed and add it to QMainWindow as this video
https://www.youtube.com/watch?v=-K-VU9I4ffYBut I now want to add my widget in code to have more flexibility. But how?
I tried
layout()->addWidget(trackEditor);//how I do that in QT4But it gave me
QMainWindowLayout::addItem: Please use the public QMainWindow API insteadhow can I do this in QT5?
Thanks