-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Added hide selected columns and show all columns to tableview context… #1135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… menu. Added a fix for building with MingW on Windows.
|
Thanks @peteristhegreat, that's excellent. 😄 @MKleusberg will probably review this tomorrow, and if it's in good shape (which it seems like from eyeballing it just now), then merge it in. |
MKleusberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much, @peteristhegreat 😄 This is already looking pretty good, I've just found these two minor things.
| #include <antlr/config.hpp> | ||
| #ifdef __MINGW32__ | ||
| #include <cstring> | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this into a separate commit because it isn't directly linked to the hide column feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I pulled the project on Windows 10 to build it, I had issues with strcpy, and in the build order, this was the first header that complained about strcpy_s issues. I agree that it could be put in as a separate issue or commit. The commit string does mention it, on the second line.
| { | ||
| ui->dataTable->showColumn(1); | ||
| ui->dataTable->resizeColumnToContents(1); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add an entry to struct BrowseDataTableSettings in MainWindow.h for saving the hidden flag of each column? It would more or less need to be implemented and used like the columnWidths member.
This would make the hidden columns stay hidden when changing to another table and coming back to the original table later. It would also save the hidden columns in the project files.
If you're unsure about this, that's no problem either. We can just merge the commit then and I'll add this later 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you could add it in later, that would be great!
I don't think I can really dig into the full column-width persistence in the near future.
Just FYI about that usage... I know that when you say showColumn() in Qt 4, QTableView doesn't respect previous column sizes for all but the most recently hidden column. Any after the first column that have been hidden, get a width of zero. It took me a while to figure that one out... this post on stackoverflow that helped point out the issue for me. https://stackoverflow.com/a/7595202/999943
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, thanks for the information 👍 That would have taken me some time as well 😉
|
No problem 😄 I'll just add the persistence bit later then. Thanks again for your PR, @peteristhegreat! If you ever feel like opening another one you're very welcome to do so 😄 |
… menu.
Added a fix for building with MingW on Windows.