Qt button() 與 buttons() 區別
阿新 • • 發佈:2019-01-28
QMouseEvent Class
QMouseEvent::button() constReturns the button that caused the event
QMouseEvent::buttons() constReturns the button state when the event was generated. The button state is a combination ofQt::LeftButton,Qt::RightButton,Qt::MidButtonusing the OR operator. For mouse move events, this is all buttons that are pressed down. For mouse press and double click events this includes the button that caused the event. For mouse release events this excludes the button that caused the event.