Answer the question
In order to leave comments, you need to log in
How to implement array output in PYQT?
I have a window in which some info should be displayed in place of "smth" (now Qlabel hangs there), I take the data from the SQL query.
But I have a dilemma: now there are 3 slots on the screen for information (there will be the name of the film and its cover). What should happen is that after selecting the sorting method and pressing the sort button, the movies are displayed. And I thought that if there are more than 3, then a button will appear below to switch to the next 3 films. It turns out that every time I have to rewrite these 3 labels manually? Is it possible to automate this somehow?
It feels like this should not be done through the label at all, but there are no ideas at all.
Answer the question
In order to leave comments, you need to log in
Well, for example, to generate a QLabel on the go, I'm not sure if this is a good practice, but in this case, personally, I would do this
for film in films:
self.label = QLabel('This is label', self)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question