Feezing panes in QTableView?



  • Hi All,

    Did anybody try to achieve pivot table in QTreeView/QAbstractTableModel?
    I would be happy if you would share how-tos. :)
    Maybe, with QSplitter???

    I have no idea at the moment.

    Many thanks in advance for your help.
    Thanks,
    Sat


  • Lifetime Qt Champion

    Hi,

    Do you mean having the tree view shown horizontally rather than vertically ?



  • @SGaist said in Pivot table in QTreeView?:
    Thanks for an update.
    Sorry, the initial information was wrong. I'm using QTableView, not QTreeView.

    Do you mean having the tree view shown horizontally rather than vertically ?

    Actually, I'm implementing a tableview, which is very similar to MS-Excel spread sheet, and it has a lot of number items both horizontally and vertically. (100 * 200 matrix)

    The first row and column item works as row's/column's header and the problem is that the matrix is too long to follow both horizontally and vertically. User can't map the item with the header(first row or column).
    SO,,,, what I want to achieve is to enable slider(s) but keep first row/column item visible wherever the user is viewing.

    Thanks,
    Sat


  • Lifetime Qt Champion

    Something like the Frozen Column Example ?



  • @SGaist Oh,, yes! Thanks for sharing a right approach!!
    My goal is something like this and it needs to be written in pyqt5.
    0_1515888162195_スクリーンショット 2018-01-14 9.02.06.png
    The headache parts are

    1. The upper left area where multiple QLabels and QPushButtons can be frozen
    2. Sort the Frozen Area 2 with View Port.

    I need some more time to understand this technique if it will work for my requirment. :)

    Thanks!!
    Sat



  • @ShinSat Now I'm customizing and testing the Frozen Column Example in Python and found one issue.
    As I mentioned previously, I need to combine two frozen areas(Frozen Area 1 & Frozen Area 2) and want the upper left corner area, which is an overlapped area between the two frozen areas, to stay wherever the current user view is.
    How is it possible? Any ideas?

    Regards,
    Sat



  • @ShinSat And now, I'm trying the 3rd frozen area on the upper left corner.
    I guess this is the solution!?

    Sat



  • Yes, you need 3 table views (frozen1, frozen2 and viewport) and a qwidget that contains the controls (the top left area)



  • @VRonin Still minor issues exist but I think I'm on right direction! Thank you very much for your help, All!! :)

    Regards,
    Sat


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.