代码如下
const char*LCDRange::text()const
{
return lable->text();
}
void LCDRange::setText(const char *)
{
return lable->setText(s);
}
错误提示:
..\tianjia\lcdrange.cpp: In member function 'const char* LCDRange::text() const':
..\tianjia\lcdrange.cpp:66: error: cannot convert 'QString' to 'const char*' in return
..\tianjia\lcdrange.cpp: At global scope:
..\tianjia\lcdrange.cpp:68: error: prototype for 'void LCDRange::setText(const char*)' does not match any in class 'LCDRange'
..\tianjia\/lcdrange.h:19: error: candidate is: const char* LCDRange::setText(const char*)