Save QSplitter state in QSettings#165
Merged
maflcko merged 1 commit intobitcoin-core:masterfrom Jan 7, 2021
Merged
Conversation
Member
|
Great idea. Was complaining about this to myself just again today. |
jonatack
approved these changes
Dec 25, 2020
Member
jonatack
left a comment
There was a problem hiding this comment.
ACK 90f9fc2 this sets the "PeersTabSplitterSizes" value in the RPCConsole dtor and restores it in the RPCConsole ctor; tested in Debian with various split settings, tab open/close sequences, and shutdown methods, and the Peers window split state was faithfully maintained.
Contributor
|
Good idea and just two lines of code. |
jarolrod
reviewed
Jan 6, 2021
Contributor
jarolrod
left a comment
There was a problem hiding this comment.
Tested ACK on macOS Big Sur 11.1 with Qt 5.15.2. Works great and is a useful feature!
sidhujag
pushed a commit
to syscoin/syscoin
that referenced
this pull request
Jan 7, 2021
90f9fc2 qt: Save QSplitter state in QSettings (Hennadii Stepanov) Pull request description: This PR adds the ability to save the `QSplitter` widget state in `QSettings` during shutdown, and restore it on startup. A user no longer needs to adjust the splitter every time :)  ACKs for top commit: jonasschnelli: utACK 90f9fc2 jonatack: ACK 90f9fc2 this sets the "PeersTabSplitterSizes" value in the RPCConsole dtor and restores it in the RPCConsole ctor; tested in Debian with various split settings, tab open/close sequences, and shutdown methods, and the Peers window split state was faithfully maintained. Tree-SHA512: efbd6a4cee512982944955d36775e75a8a217b1dc49e62d42c6e402d2710dd44324b2c3c1edeb5fe38d9229e0e4a39734d1f4e63405ade8694762e1bbf72020b
Member
|
Note that we might need to change the setting name for each version that adds/removes columns :/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to save the
QSplitterwidget state inQSettingsduring shutdown, and restore it on startup.A user no longer needs to adjust the splitter every time :)
