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 (2.0) #5256

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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();
});

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

1 participant