This paper studies quantile regression for spatial panel data models with varying coefficients, taking the time and location effects of the impacts of the covariates into account, i.e., the implications of covariates may change over time and location. Smoothing methods are employed for approximating varying coefficients, including B-spline and local polynomial approximation. A fixed-effects quantile regression (FEQR) estimator is typically biased in the presence of the spatial lag variable. The wild bootstrap method is employed to attenuate the estimation bias. Simulations are conducted to study the performance of the proposed method and show that the proposed methods are stable and efficient. Further, the estimators based on the B-spline method perform much better than those of the local polynomial approximation method, especially for location-varying coefficients. Real data about economic development in China are also analyzed to illustrate application of the proposed procedure.