When a film of a liquid suspension of nanoparticles or a polymer solution is deposited on a surface, it may dewet from the surface and as the solvent evaporates the solute particles/polymer can be deposited on the surface in regular line patterns. In this paper we explore a hydrodynamic model for the process that is based on a long-wave approximation that predicts the deposition of irregular and regular line patterns. This is due to a self-organised pinning-depinning cycle that resembles a stick-slip motion of the contact line. We present a detailed analysis of how the line pattern properties depend on quantities such as the evaporation rate, the solute concentration, the Péclet number, the chemical potential of the ambient vapour, the disjoining pressure, and the intrinsic viscosity. The results are related to several experiments and to depinning transitions in other soft matter systems.