-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow Strings' columns to be resized (#2711) #2720
base: dev
Are you sure you want to change the base?
Conversation
Hello, thanks for the contribution! |
What should we do with this? It's indeed nice to be able to resize the columns, however I'm not sure if the current implementation is better than the fixed sized columns we had before. |
I can try to get the fix out within the next week; sorry have been busy with school lately. To clarify the implementation should present the interface as it does now but also support resizing, correct? |
I believe that would be the best, yes! |
@@ -214,10 +214,8 @@ StringsWidget::StringsWidget(MainWindow *main) | |||
}); | |||
|
|||
auto header = ui->stringsTreeView->header(); | |||
header->setSectionResizeMode(QHeaderView::ResizeMode::ResizeToContents); |
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.
It also works when just changing this line to "header->resizeSections(QHeaderView::ResizeMode::ResizeToContents);"
unless specifying maximum-length at start, it can be risky as some strings can be VERY long an the column resizer will be far far to the right. |
Your checklist for this pull request
Detailed description
I began by comparing the current release of Cutter that I am using to v1.9 as mentioned in the issue to see what the missing functionality looked like. After experimenting with
resizeSections()
andsetSectionResizeMode()
and googling about stretched and interactive columns in Qt I arrive at my current solution.Before (v1.11):
After:
The only issue I can see is that on startup the columns aren't spaced the same in v11.1 where the Strings column is stretched. Should this also be incorporated into this fix?
Closing issues
Closes #2711