Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Passing a Qt object from a function
ChrisW last edited by
I'm trying to figure out a way to return a Qt object from a function such as a QPushButton. I think that it would be ideal to create buttons instead of me writing the same code over and over for 10+ buttons. I included an image so that you can see what I tried to do.
jnguetsop last edited by
The definition and the call to the method createButton seem correct. Can you show me the contents of the header file? Specifically the declaration of createButton method.
ChrisW last edited by ChrisW
Thanks a million. I was able to fix it. I didn't include the QtWidget Class in the header file.