Home > Back-end >  Qt Accidental activation of dragLeaveEvent,what should I do?
Qt Accidental activation of dragLeaveEvent,what should I do?

Time:10-08

I have a QPushButton on a QScrollArea, the parent of the QPushButton is the QScrollArea. I drag the object to the QScrollArea and then to the QPushButton which always activates the dragLeaveEvent of the QScrollArea, I don't want this function to activate, what should I do?

CodePudding user response:

Thank you for your replies, I have solved the problem. The method is very simple, just set the parent of the QPushButton to QScrollArea::widget() and it's solved.

  •  Tags:  
  • c qt
  • Related