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. Can't Decide what UI component to use for Memory Allocation simulation
Forum Updated to NodeBB v4.3 + New Features

Can't Decide what UI component to use for Memory Allocation simulation

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 Posters 1.0k Views 3 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.
  • A Offline
    A Offline
    alaaelnouby
    wrote on last edited by alaaelnouby
    #1

    Hi Everyone ,

    It is just my second time using QT , i have an assignment and i should simulate memory allocation , getting processes from user.

    I just don't know what to use to represent the memory , in each memory slot i need to represent the process name and the address of the slot of course.

    I have thought about using table with one column and rows with variable heights (small one for the address and large one for the process name , which means each slot will take 2 rows) but i couldn't know how to have a table with varying row heights.

    Thanks.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi,
      you should consider to implement the GUI with QML/QtQuick. It's much more flexible than traditional QWidgets and you can very easily make the GUI look whatever you want it to.

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

        Hi and welcome to devnet,

        To control the row height, you can implement a QStyledItemDelegate that will return the good value for sizeHint.

        Hope it helps

        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
        • Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #4

          I would keep it simple: a table with two columns, one for the process name, the other for the memory address. A nice to have feature: make the table sortable by columns, so you can order the processes either by name or memory address.

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • A Offline
            A Offline
            alaaelnouby
            wrote on last edited by
            #5

            Thanks Very much , it was really helpful , i used a table with the row index as the slot address and it looked acceptable i guess.

            1 Reply Last reply
            0

            • Login

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