摘要:
在学习《C++ GUI Programming with Qt 4》第四章例子中有如下代码Cell *Spreadsheet::cell(int row, int column) const{ return static_cast<Cell *>(item(row, column)); //报错 //return qobject_cast<Cell *>(item(row, column));}注释内容报错,查看qobjec_cast。T qobject_cast ( QObject * object )本方法返回object向下的转型T,如果转型不成功则返回0,如果传 阅读全文