这个问题其实很简单,不要怀疑你的代码问题,案情还原:
QCursor my(QPixmap("mouse.png"));
QApplication::setOverrideCursor(my);
执行报错:
只要你确定 你的代码中路径是对的 ,当报这个错的真实意思是,找不到 你路径中的图片QCursor: Cannot create bitmap cursor; invalid bitmap(s)

这个问题其实很简单,不要怀疑你的代码问题,案情还原:
QCursor my(QPixmap("mouse.png"));
QApplication::setOverrideCursor(my);
执行报错:
只要你确定 你的代码中路径是对的 ,当报这个错的真实意思是,找不到 你路径中的图片QCursor: Cannot create bitmap cursor; invalid bitmap(s)