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. How to get this layout?
QtWS25 Last Chance

How to get this layout?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 238 Views
  • 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.
  • W Offline
    W Offline
    Wizz
    wrote on last edited by
    #1

    I want to make a NxN grid of widgets like this, i tried using QListWidget but i cant seem to get it working right especially regarding the sizes of each picture. So i was wondering if there is an easier way to do this
    0_1566584840602_dddf5ecc-b2a7-445f-a5f5-9e50bdad5bab-image.png

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You can put these two widgets together in a QVBoxLayout and then put that new widget in a QGridLayout

      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
      2
      • W Offline
        W Offline
        Wizz
        wrote on last edited by
        #3

        @sgaist but i need to have a variable size of them, sometimes 10 widgets like this sometimes 30(with scrolling)

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You can put the "container" widget in a QScrollArea.

          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
          2

          • Login

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