Passing a Qt object from a function
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.
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.
Thanks a million. I was able to fix it. I didn't include the QtWidget Class in the header file.