Power Quality Disturbances (PQDs) are caused by large-scale grid connections of nonlinear loads and Distributed Generations (DG). They affect the electrical and electronics equipment performance and may cause serious accidents and economic losses. The classification of PQDs becomes a key issue for end-users in order to enhance the Power Quality (PQ) and comprises an important step in monitoring the Electric Power System (EPS). Accurate PQDs classification is crucial for improving the quality of power supply, monitoring the condition of power equipment, and mitigating power grid issues. In the literature, several methods for detecting and classifying PQDs have been proposed. However, these methods consume a significant amount of processing time due to the detection and sample storage steps required to classify each disturbance class. In this work, we propose a method for classifying PQDs on a sample-by-sample basis. The innovation of this method lies in its ability to classify PQDs for each individual sample, thereby eliminating the need for window-based (batch) processing. To do so, it is applied the Sliding Window Recursive Discrete Fourier Transform (SWRDFT) to real-time estimation of PQ parameters. For the classification stage, decision tree, Artificial Neural Networks (ANN), Ensemble and the Naive Bayes classifiers were employed. The proposed method using Ensemble achieved the most satisfactory results for six different types of PQDs (oscillatory transients, harmonics, notches, sags, spikes and swells), in which oscillatory transients and spikes were identified in the first monitored samples (sample 2 and 11 respectively), sags were identified in the 14th sample counting from the beginning of the disturbance, notches were captured from the 35th sample, and harmonics and swells were identified after the 113th sample.