Results 1 to 3 of 3

Thread: QColumnView persistence

  1. #1
    Join Date
    Jul 2013
    Posts
    15
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default QColumnView persistence

    Hi all,

    How can one have persistence on the splitter(s) of a QColumnView.

    Already have it for others, unfortunately I cannot seem to figure out how to for QColumnView.

    Tried saveGeometry() and restoreGeometry(...) however I believe they are the window size/placement ...

    Thanks

    -Enjoy
    fh : )_~

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: QColumnView persistence

    Use columnWidths() and setColumnWidths()
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. #3
    Join Date
    Jul 2013
    Posts
    15
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QColumnView persistence

    Thanks Santosh,

    Been trying that but have been unsuccessful in saving the QList<int> with QSettings.

    Even after declaring it as a meta object ...

    So obviously I'm doing something wrong somewhere and not finding a clear example.

    -Enjoy
    fh : )_~

Similar Threads

  1. How do I set selection in QColumnView?
    By hazzmax in forum Qt Programming
    Replies: 1
    Last Post: 22nd February 2017, 13:04
  2. QxOrm : Persistence (ORM), Serialization, Reflection
    By QxOrm in forum Qt-based Software
    Replies: 19
    Last Post: 27th January 2014, 04:36
  3. mousePressEvent with QColumnView
    By BreakBad in forum Qt Programming
    Replies: 2
    Last Post: 13th August 2013, 19:43
  4. How to use QColumnView with QSqlTableModel
    By npascual in forum Qt Programming
    Replies: 2
    Last Post: 21st June 2013, 07:37
  5. QDirModel and QColumnView question
    By yartov in forum Qt Programming
    Replies: 3
    Last Post: 11th April 2008, 21:56

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.