Hi
Just a note first
Having
class SerialPort : public QObject
and then
QSerialPort *serialPort;
Where only diffence is capital S to the main class is just confusing.
anyway, why is the issue with
settings(new SettingsDialog()),
did you declare it as
void settings(SettingsDialog *mydialog)
Im not sure what you dont understand.
To use a pointer to a class in another class, you simply give the pointer to the other class and it can use it
class B {};
class A {
B* mykeptBpointer;
setB(B* myb) {
mykeptBpointer = myb;
}
void DoB {
mykeptBpointer->xxxx();
};
A mya;
B* myb = new B;
mya.setB(b);
oh, is
settings(new SettingsDialog())
rather
settings = new SettingsDialog();