What it means
かと思うと describes a second event that happens immediately after the first, often so quickly that the speaker presents the change as surprising or unexpected. It commonly follows a verb in the plain past form and is used for sudden changes, repeated actions, or situations in which one state gives way to another. The subject may stay the same or change, but the two events are normally closely connected in time. The sentence after かと思うと is usually not a deliberate action planned by the subject.
Usage note
かと思うと is not normally used for an ordinary intentional sequence such as finishing one task and then choosing to start another. For a more neutral sequence of actions, use forms such as てから or たあとで.
How to use it
電車が駅に到着したかと思うと、すぐに発車しました。
Just when the train arrived at the station, it departed immediately.
電車が駅に到着したかと思うと、すぐに発車した。
Just when the train arrived at the station, it departed immediately.
