【发布时间】:2012-06-22 21:51:57
【问题描述】:
我正在阅读一些关于 qt 中 openGL 的教程。 其中一个鼠标事件槽中包含以下代码:
if (event->buttons() & Qt::LeftButton) {
rotationX += 180 * dy;
rotationY += 180 * dx;
updateGL();
}
& 运算符在 if 语句中的作用是什么? 和 == 完全一样吗?
【问题讨论】:
标签: c++ bitwise-operators