c++ - How does Qt's QHeaderView::saveState() and QHeaderView::restoreState() work? -
I would like to save the table order of the tableview, and whether each column is shown or not. It seems that QHeaderView :: saveState () and QHeaderView :: restoreState () does what I need.
I have read, but neither says that I have tried to see what is actually left, but have not got the implementation.
I need to understand what is done below is that I am the refactoring code which already saves column order and hidden column preferences, I want to make sure that QHeaderView :: saveState ( ) And QHeaderView :: restoreState () does the exact same thing thanks.
and the following data is saved:
outside & lt ; & Lt; Integer; Outside & lt; & Lt; Integer (sortIndicatorOrder); Outside & lt; & Lt; SortIndicatorSection; Outside & lt; & Lt; SortIndicatorShown; Outside & lt; & Lt; VisualIndices; Outside & lt; & Lt; LogicalIndices; Outside & lt; & Lt; SectionHidden; Outside & lt; & Lt; HiddenSectionSize; Outside & lt; & Lt; Length; Outside & lt; & Lt; SectionCount; Outside & lt; & Lt; MovableSections; Outside & lt; & Lt; ClickableSections; Outside & lt; & Lt; HighlightSelected; Outside & lt; & Lt; StretchLastSection; Outside & lt; & Lt; CascadingResizing; Outside & lt; & Lt; StretchSections; Outside & lt; & Lt; ContentSections; Outside & lt; & Lt; DefaultSectionSize; Outside & lt; & Lt; MinimumSectionSize; Outside & lt; & Lt; Integer (defaultAlignment); Outside & lt; & Lt; Integer (globalResizeMode); Span for each section: out & lt; & Lt; Shape; Outside & lt; & Lt; Count; Outside & lt; & Lt; (Int) resize mode
Comments
Post a Comment