Resizing cell without headers?



  • Hi Gurus,

    Does anybody know if there's a way to implement resizing capability without horizontal/vertical headers in QTableView/QAbstraceTableModel? What is a right direction to customize the behavior?

    I want cell to be resized by dragging its border, which is exactly a functionality that Ms-Excel provides.
    I know it's possible with the headers, but want to look for a way to achieve without that.
    This is for good-looking purpose. :)

    Thanks in advance for your information.
    Regards,
    Sat


  • Moderators

    @ShinSat said in Resizing cell without headers?:

    What is a right direction to customize the behavior?

    1. call setResizeMode(QHeaderView::Fixed) on the horizontal header
    2. hide the horizontal header view
    3. filter mouse events on the table view's viewport and change the mouse cursor accordingly
    4. resize dragged column via QHeaderView::resizeSection()


  • Slightly OT

    @ShinSat said in Resizing cell without headers?:

    which is exactly a functionality that Ms-Excel provides

    Maybe I'm just using an old version of excel but I need to use headers to resize rows/cols

    Edit

    I'm on MS Office 2013


  • Qt Champions 2016

    @VRonin
    Indeed. excel 2003 do not have this feature
    alt text

    But that is older than old :)


Log in to reply
 

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