void selection::getItemDir(
QString * itemname)
{
QString str1 = QDir::convertSeparators(getenv("MCP"))+"/project/";
QString str2 =str1+itemname+".prj";
}
//read .prj file
void selection::slotOk()
{
if (lbPro->count()>0)
{
QString item=lbPro->selectedItem()->text();
getItemDir(&item);
}
}
编译过程报错error C2678: binary '+' : no operator defined which takes a left-hand operand of type 'class QString' (or there is no acceptable conversion)
其中 如何将itemname转化为char》或者换种方式获得字符串str2.
超
新手 求高手指点。
[ 此帖被codeiei在2011-04-13 11:09重新编辑 ]