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

  • 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.


  • 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.

  • Lifetime Qt Champion

    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

  • 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.

  • 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.

Log in to reply