Repository navigation
No member named _is_QWidget? #147
|
I am probably missing something obvious, but when I try to add a QHBoxLayout to my QMainWindow I get the error var ret = try alloc.create(AppMainWindow);
ret.w = qt6.QMainWindow.New2();
const programButtons = qt6.QHBoxLayout.New2();
ret.w.SetCentralWidget(programButtons);I've also tried const programButtons = qt6.QHBoxLayout.New(ret.w);
ret.w.SetCentralWidget(programButtons);Anyone know what I've missed? I've added |
Answered by
rcalixte
Jun 6, 2026
Replies: 1 comment
|
Hi! Thanks for the interest! The issue is that |
0 replies
Answer selected by
MartinAskestad
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! Thanks for the interest!
The issue is that
QMainWindow::setCentralWidgetexpects a parameter of typeQWidgetor one that inherits from it. QHBoxLayout does not inherit from QWidget which is why you are seeing that error. If you were to use an object of the type QPushButton for example, that should work just fine.