Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QListWidget expand to the height of the widgets inside like layout
Forum Updated to NodeBB v4.3 + New Features

QListWidget expand to the height of the widgets inside like layout

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 329 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • EmrecpE Offline
    EmrecpE Offline
    Emrecp
    wrote on last edited by
    #1

    Hello, I want to make the design below in qt. I have a few questions.
    1-min.png
    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 )
    iamge2-min.png

    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

    1 Reply Last reply
    0
    • EmrecpE Emrecp marked this topic as a regular topic on
    • EmrecpE Emrecp marked this topic as a question on
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Please don't post the same question in multiple sub forum, one is enough.

      Duplicate

      Closing this one

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • SGaistS SGaist locked this topic on

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved