Victor
Victor

Reputation: 1

PyQt: How to set QSlider moves automatically over time?

I have a GUI for a network of nodes. There are time-based data logs that I read from to make changes to the nodes. In the GUI I plot the nodes as QGraphicsItems. Based on the logs, the nodes change for example their colors and positions over time. I want to add a QSlider that works like a video progress bar, i.e. it moves automatically when reading data from the logs. How can this be implemented?

Thanks in advance.

Upvotes: 0

Views: 127

Answers (1)

BioTubolo
BioTubolo

Reputation: 36

I think you can read the data in a QThread and update the QSlider every line you read, or every x ammount of logs. You can use slot and signal to communicate between the QThread and the UI main thread (or Application thread or whatever).

Upvotes: 0

Related Questions