Can You show real code ? In the first post you showed some strange pieces of code that do not make sense.
Can You show real code ? In the first post you showed some strange pieces of code that do not make sense.
If the original code fragment posted is part of the real code, then the line "MainWindow m;" is creating a new second instance of MainWindow on the stack and is trying to use the QSerialPort that was previously created and opened in the first MainWindow instance.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
You can pass the pointer of a QSerialPort object or use the signals and slots mechanism.
Bookmarks