我在这段代码中收到以下错误。
QScopedPointer<NoteEvent> onEvent(new NoteEvent(date, chan, pitch, vel, true));
QScopedPointer<NoteEvent> offEvent(new NoteEvent(date + dur, chan, pitch, vel, false));
Score::noteStream->addNoteEvent(onEvent);
Score::noteStream->addNoteEvent(offEvent);
void NoteStream::addNoteEvent(QScopedPointer<NoteEvent> noteEvent)
{
noteEvents->push_back(noteEvent);
}
错误:C2248:“QScopedPointer”:无法访问 QScopedPointer 中声明的私有成员
阅读其他帖子没有帮助。