Basic question - What am I doing wrong here?
Solved
General and Desktop
-
Hi,
Still got my training wheels on.
I don't know why it won't recognize the objects listWidget and each of the numerically named ones - they are objects defined within the GUI form.The functions printlist() and setNumbers() are both declared in the mainwindow.h.
For some reason, they work fine if I place the code in the MainWindow constructor, but if I put them into a function and call them, it doesn't recognize them.
I've tried preceding them with ui-> as well, but then it complains it doesn't recognise 'ui'.Any hints?
Thanks. -
printList(..) & setNumbers(..) are not method of your class MainWindow. Move those methods as class methods. It should work.