Quote Originally Posted by yogeshgokul View Post
Replace sprintf with QString::arg.
Qt Code:
  1. if (nodeData.addr==1)
  2. {
  3. nodeName = "room";
  4. }
  5. else if (nodeData.addr==2)
  6. {
  7. nodeName = "bed";
  8. }
  9. else if (nodeData.addr==3)
  10. {
  11. nodeName = "kitchen";
  12. }
  13. else
  14. {
  15. nodeName = "End Device";
  16. }
To copy to clipboard, switch view to plain text mode 

the if else statement share the same variable QString nodeName, u sure the %1 can work? i tried it cant work.