The invention discloses a quick-mounting clamp for connection of photovoltaic panels of a building roof, and relates to the technical field of clamps, the quick-mounting clamp comprises side clamping plates, a middle clamping plate, a bottom clamping plate and a guide rail, and the side clamping plates, the middle clamping plate and the bottom clamping plate are all mounted on the guide rail through connecting pieces; fixing grooves are formed in the tops and the side walls of the guide rails, the connecting pieces are arranged in the fixing grooves in a sliding mode, and the side clamping plates, the middle clamping plate and the bottom clamping plate are fixedly connected with the connecting pieces through bolts; the bottom clamping plate is of an L-shaped structure, a strip-shaped hole is formed in the bottom of the bottom clamping plate, and the interior of the strip-shaped hole can be fixedly connected with a building roof through screws. Side pressing parts are arranged at the tops of the side clamping plates, and are used for pressing and fixing the outer side frames of the photovoltaic modules on the side edges; through the design of the fixing grooves in the top and the side wall of the guide rail, the connecting piece is allowed to freely slide along the rail, the step of repeated measurement and alignment in traditional installation is omitted, installation personnel only need to slide a clamp to a target position and tighten a bolt, space positioning can be completed, and the installation efficiency is improved.