I am trying to create a GUI in QTCreator using Python but whenever I try to edit the code on a button I get the following error.
I have tried rebuilding the project multiple times and I am still getting the same error.
I am trying to create a GUI in QTCreator using Python but whenever I try to edit the code on a button I get the following error.
I have tried rebuilding the project multiple times and I am still getting the same error.
I had similar issues using c++, and I just added a slot in the header file and corresponding function in cpp file.
For my application, it was about the double spin box in a second window. I just followed the naming convention that qtcreator made for another example, and it worked.
in header file:
private slots:
void on_doubleSpinBox_MaxDepth_valueChanged(double arg1);
in cpp file:
void ProjectionsWindow::on_doubleSpinBox_MaxDepth_valueChanged(double arg1) {
//do something}
I'm not sure how it should be written in python, but maybe try similar method?
You probably created a UI form without its corresponding header and source file, ie. ui_ui_form.h
and ui_ui_form.cpp
as shown in the error message.
By choosing Qt Designer Form Class
when adding a new file to your project, you will get those files auto-created for your .ui
form. Please see the screenshot:
I had the same issue. if there is a .pro file check in there to see if the form.h is in the same format as well as in your form.cpp I had to delete and re-add them and do a rebuild all and it worked I hope it works for you as well.
© 2022 - 2024 — McMap. All rights reserved.