Skip to content
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

Show line indicator instead of rectangle while dragging in tables #5256

Merged
merged 4 commits into from
Jun 16, 2024

Conversation

Nerixyz
Copy link
Contributor

@Nerixyz Nerixyz commented Mar 18, 2024

See #5252. This is essentially the same implementation, except that the TableRowDragStyle creates its own QStyle based on the currently applied style (which is the application style). Previously, the widget this style was applied to didn't have its own style, which causes it to default to the application style. And since QProxyStyle adopts the style without any agreement from the current parent (qApp), this causes a crash after deleting the proxy (and its children). I thought it would be a bit more involved (see message in #5255).

You can test how the objects are destroyed by breaking:

QObject::connect(proxyStyle, &QObject::destroyed, [] {
    _CrtDbgBreak();
});
QObject::connect(proxyStyle->baseStyle(), &QObject::destroyed, [] {
    _CrtDbgBreak();
});
QObject::connect(view, &QObject::destroyed, [] {
    _CrtDbgBreak();
});

@pajlada pajlada changed the title Show line indicator instead of rectangle while dragging in tables (2.0) Show line indicator instead of rectangle while dragging in tables Jun 16, 2024
@pajlada pajlada enabled auto-merge (squash) June 16, 2024 10:50
@pajlada pajlada merged commit 2b97c64 into Chatterino:master Jun 16, 2024
17 checks passed
@Nerixyz Nerixyz deleted the fix/table-view-for-real-this-time branch June 16, 2024 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants