Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

ui form



  • Hi,
    I would like to find some example/guidelines to do this kind of form
    86553da4-9e83-45c3-b58e-b0712cb65090-image.png


  • Moderators

    This is effectively a TableView that would have delegates for the columns from the looks of things. I suggest having a look at it here. In Qt 5.15 there will be headerview classes added to Qt Quick Controls 2 too, so that will help with the header part as well, see here for more information on that.


  • Qt Champions 2017

    @AndyS said in ui form:

    In Qt 5.15 there will be headerview classes added to Qt Quick Controls 2 too, so that will help with the header part as well, see here for more information on that.

    What I'm interested to know is (if you have info):

    1. Will in Qt6 the header view know what a tree model is, and can we get subheaders for model indices (probably not, but still curious)?
    2. Are we going to get delegates for the header view? I've been hacking my way out of this conundrum on multiple occasions and it ain't at all pretty if you don't want to link against the privates and effectively rewrite significant portions of the code?

  • Moderators

    @kshegunov said in ui form:

    @AndyS said in ui form:

    In Qt 5.15 there will be headerview classes added to Qt Quick Controls 2 too, so that will help with the header part as well, see here for more information on that.

    What I'm interested to know is (if you have info):

    1. Will in Qt6 the header view know what a tree model is, and can we get subheaders for model indices (probably not, but still curious)?

    I don't think there are plans in this direction, but I might not be aware of it yet. Though I would think that it is easier than it seems with the new headerview type at least as it is easier to add in your own than it is with widgets since it is a subclass of TableView. So it should be doable but I have not personally tried it.

    1. Are we going to get delegates for the header view? I've been hacking my way out of this conundrum on multiple occasions and it ain't at all pretty if you don't want to link against the privates and effectively rewrite significant portions of the code?

    Yes, the headerview in Qt Quick Controls 2 is a subclass of TableView so you can have delegates for it.



  • Unfortunately, I have to stick to Qt 5.9. I am on an opensuse 42.3 system.
    I am not sure, if I can upgrade the qt sdk ?

    it looks like tableview is available in QtQuick.Controls 1.4


  • Qt Champions 2017

    @sancelot said in ui form:

    I am not sure, if I can upgrade the qt sdk ?

    Is your opensuse version supported? If so, you can either build a newer Qt by yourself or get it from the maintenace tool.



  • I have to stick to Qt 5.9.

    I almost managed to do what I needed using ListView to edit data

    capt1504.JPG

    the row is a bit complicated than the inital layout, it is a ListView row containing 2 rowlayouts.
    the second row is disabled or enabled by a switch

    I have a focus problem, I am able to move between cells left , right, bottom, up . BUT the view does not scroll when I go down past the visible area.

    The move between cells is a bit complicated,


Log in to reply