QListWidget expand height dynamically
-
Hello, I want to make the design below in qt. I have a few questions.
1. question
In this design, the mouse can be scrolled and scrolled down almost infinitely. I want to do this too but if I use QListWidget for the list in category "All Games" this qlistwidget doesn't expand. (Picture 2) (Scrollbar is visible in the bottom qlistwidget, it should not be visible and the height of the qlistwidget should expand dynamically )
If I prefer QHBoxlayout instead of QListWidget I can get the look I want, but I want to use qlistwidget for ease of use.
Code for QListWidget:
item = QListWidgetItem() kart_oyun = GameWidget(mydata, item=item, liste=self.ui.listGames) # my custom widget item.setSizeHint(kart_oyun.size()) myqlistwidget.addItem(item) myqlistwidget.setItemWidget(item, kart_oyun)
Code for layout:
kart_oyun = GameWidget(mydata, item=item, liste=self.ui.listGames) # my custom widget self.layGames.addWidget(kart_oyun)
2. question
I added animation when hovering over my custom widget (card) and the card expands, but sometimes when it doesn't fit, it goes to the bottom line and becomes unreadable (video is also clearer)VIDEO: STREAMABLE
-
-
@StarterKit First of all thank you very much for your reply. Can you write a short sample code?
-
@Emrecp, I don't think my code would be any better then "an official one".
So I would propose you to review a Fetch More Example