Hi
I am using QextSerialPort class.with my application i am going to configure the port settings of my pc.
to achieve the above tasks i collect the port setting parameters from my gui combo boxes(which are string type) and i converted "string" parameters to "enum" type using below expression
QString portdbs
=ui.
comboBox_3->currentText
();
portdbs=portdbs.prepend("DATA_");
DataBitsType dbs=(DataBitsType)Enum.Parse(typeof(DataBitsType), portdbs,true);
port->setDataBits(dbs);
QString portdbs=ui.comboBox_3->currentText();
portdbs=portdbs.prepend("DATA_");
DataBitsType dbs=(DataBitsType)Enum.Parse(typeof(DataBitsType), portdbs,true);
port->setDataBits(dbs);
To copy to clipboard, switch view to plain text mode
after this i compiled my application,but am getting below error:
main.cpp:2381: error: `Enum' undeclared (first use this function)
main.cpp:2381: error: (Each undeclared identifier is reported only once for each
function it appears in.)
main.cpp:2381: error: expected primary-expression before ')' token
main.cpp:2381: error: expected `,' or `;' before "Enum"
For avoiding that error i added "using System;" to my application,but surprisingly my edit plus editor is not detecting the "using"keyword(i.e the color is not changing)
please help me on this issue.
Thanks alot to all,
Bookmarks