[Solved] QPushButton change text
I am trying to make it so that when the pushButton is clicked the text on it changes. At the moment my programming in the slot is
When I compile the code it says: Invalid use of non-static data member 'pushButton'
How do I get around this problem?
I think you shouldn't access your pushButton like that, it's not a static member. Try with
Whether your Ui_mainWindow is created on heap or stack. Does this work?
PS: next time, type your code between "@", that will make things neat and clear.
Thanks, but unfortunately this doen't work either. The compiler now gives the error: "expected unqualified-id" for both options.
Could you provide some more code if possible please?
Thanks, that worked. I see what I was doing wrong now.