A construction machine comprising: an engine that is mounted on a vehicle body (2,3) and serves as a prime mover; a hydraulic pump that is driven by the engine and delivers pressurized oil; a hydraulic actuator driven by the pressurized oil delivered from the hydraulic pump; a gate lock lever that is provided in an entrance of a driver's seat of the vehicle body (2,3) and is switchable between a lock position prohibiting a drive of the hydraulic actuator and a lock release position allowing the drive of the hydraulic actuator; a controller configured to have an idling stop function of automatically stopping the engine when a state where the gate lock lever is in the lock position lasts for a specified time; and a horn switch to be operated at a time for generating sounds to the surroundings of the vehicle body (2,3) from a horn, characterized in that: the controller is configured as follows: to perform, in a case where an elapse time after the engine is automatically stopped by the idling stop function does not yet reach a preset restart standby time, control of restarting the engine in a state where the horn switch is operated and the gate lock lever is in the lock position, to perform, in a case where the elapse time after the engine is automatically stopped by the idling stop function has reached the restart standby time, control of stopping a power supply of the vehicle body (2,3), and to determine whether or not an elapse time after the horn switch is operated is equal to or more than a preset restart preparation time, and to restart the engine in a case where the restart preparation time has elapsed. an engine that is mounted on a vehicle body (2,3) and serves as a prime mover; a hydraulic pump that is driven by the engine and delivers pressurized oil; a hydraulic actuator driven by the pressurized oil delivered from the hydraulic pump; a gate lock lever that is provided in an entrance of a driver's seat of the vehicle body (2,3) and is switchable between a lock position prohibiting a drive of the hydraulic actuator and a lock release position allowing the drive of the hydraulic actuator; a controller configured to have an idling stop function of automatically stopping the engine when a state where the gate lock lever is in the lock position lasts for a specified time; and a horn switch to be operated at a time for generating sounds to the surroundings of the vehicle body (2,3) from a horn, characterized in that: the controller is configured as follows: to perform, in a case where an elapse time after the engine is automatically stopped by the idling stop function does not yet reach a preset restart standby time, control of restarting the engine in a state where the horn switch is operated and the gate lock lever is in the lock position, to perform, in a case where the elapse time after the engine is automatically stopped by the idling stop function has reached the restart standby time, control of stopping a power supply of the vehicle body (2,3), and to determine whether or not an elapse time after the horn switch is operated is equal to or more than a preset restart preparation time, and to restart the engine in a case where the restart preparation time has elapsed. a hydraulic actuator driven by the pressurized oil delivered from the hydraulic pump; a gate lock lever that is provided in an entrance of a driver's seat of the vehicle body (2,3) and is switchable between a lock position prohibiting a drive of the hydraulic actuator and a lock release position allowing the drive of the hydraulic actuator; a controller configured to have an idling stop function of automatically stopping the engine when a state where the gate lock lever is in the lock position lasts for a specified time; and a horn switch to be operated at a time for generating sounds to the surroundings of the vehicle body (2,3) from a horn, characterized in that: the controller is configured as follows: to perform, in a case where an elapse time after the engine is automatically stopped by the idling stop function does not yet reach a preset restart standby time, control of restarting the engine in a state where the horn switch is operated and the gate lock lever is in the lock position, to perform, in a case where the elapse time after the engine is automatically stopped by the idling stop function has reached the restart standby time, control of stopping a power supply of the vehicle body (2,3), and to determine whether or not an elapse time after the horn switch is operated is equal to or more than a preset restart preparation time, and to restart the engine in a case where the restart preparation time has elapsed. to perform, in a case where an elapse time after the engine is automatically stopped by the idling stop function does not yet reach a preset restart standby time, control of restarting the engine in a state where the horn switch is operated and the gate lock lever is in the lock position, to perform, in a case where the elapse time after the engine is automatically stopped by the idling stop function has reached the restart standby time, control of stopping a power supply of the vehicle body (2,3), and to determine whether or not an elapse time after the horn switch is operated is equal to or more than a preset restart preparation time, and to restart the engine in a case where the restart preparation time has elapsed.