I was receiving this error once, when I was trying to add signals & slots to one of my classes. I figured out that Qt was having problems with moc files, and there were no moc files being generated.
To solve the problem, I specified “moc directory” in the project’s .pro file:
OBJECTS_DIR = debug/obj
MOC_DIR = debug/moc
And my problem was solved 😀
I didn’t found any doc for QSerialDevice – but what I found was a doxygen file, 😛 so I generated documentation files. Here I’m uploading them so that people can get the docs without doxygen installing.
Documentation – version 0.4.0
To resolve the error, make sure:
- To include “network” in your .pro file: QT += core gui network
- Include appropriate headers: