我正在阅读有关qt中openGL的一些教程.其中一个鼠标事件槽中包含以下代码:
if (event->buttons() & Qt::LeftButton) { rotationX += 180 * dy; rotationY += 180 * dx; updateGL(); }
&运算符在if语句中做了什么?它和==完全一样吗?
c++ bitwise-operators
bitwise-operators ×1
c++ ×1