未参考的形式参数Qt游戏

时间:2017-12-21 03:20:37

标签: qt

override func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {

    switch velocity {
    case _ where velocity.y < 0:
        // swipes from top to bottom of screen -> down
        trackingDirection = .down
    case _ where velocity.y > 0:
        // swipes from bottom to top of screen -> up
        trackingDirection = .up
    default: trackingDirection = .none
    }
}

警告C4100:'父':未参考的正式参数

1 个答案:

答案 0 :(得分:-1)

如果Game类派生自QDialog,则不使用父参数,然后应将其用于初始化QDialog,如下所示:

Game::Game(QWidget *parent):QDialog(parent)