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:'父':未参考的正式参数
答案 0 :(得分:-1)
如果Game
类派生自QDialog
,则不使用父参数,然后应将其用于初始化QDialog
,如下所示:
Game::Game(QWidget *parent):QDialog(parent)