Hello,
class 1
Its a QMainWindow called mainwindow, the form contains a QComboBox (myCombo - its populated).
class 2
I'm trying to access a control in class 1 from class 2.
QString where = mainwindow::myCombo->currentText();
myCombo is private.
error: 'QComboBox* mainwindow::myCombo' is private
I make the QComboBox public.
error: invalid use of member 'mainwindow::myCombo' in static member function
I make the QComobox static.
error: undefined reference to `mainwindow::myCombo'
I obviously don't understand the access method.
The internet hasn't helped me.
Is this something to do with declaring 'extern' or maybe use signals & slots.
Can somebody please help. Thanks in advance.
Regards
Bookmarks