Important: Please read the Qt Code of Conduct -

Custom tree list

  • I was wondering if it's possible to create a kind of tree list that when it's empty it appears like we see in HTML/CSS tables over the internet, specially on dashboards, that appears a kind of text or other thing (a placeholder with links and images), and when you add a new entry it disappears. Like this:

    Note that the headers appears and the text is within the table.

    This one is a more advanced one, it appears when it's empty and there are more links and a kind of descriptions and so on.

    Note that I said: tree list and not table, it's because I'm going to be using tree and not table. (idk if this information will make any difference).

  • Lifetime Qt Champion


    One possibility is to use two different widgets. Use a QStackedWidget to show your "placeholder" widget and when someone does what you want on it, switch to your tree view.

  • That is one good alternative, what about the first one where it has a label inside a table?

  • Lifetime Qt Champion

    You can use an index widget.

    Or have a custom widget manually placed there just below the horizontal header view.

  • You rock @SGaist , thank you very much, I think that with this information I'll be able to do what I want to.

Log in to reply