Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ポイントをクリックすると、そのポイントが別の色になるように mousePressEvent を実装しました。選択したポイントがマウスで移動するように、mouseMoveEvent に何を入れなければならないか教えてもらえますか?
ポイントの座標を保持し、それに応じて更新し、メソッドの最後にmousePressEvent呼び出す必要があります。update()次に、ペイント イベントでポイントをペイントする必要があります。
mousePressEvent
update()