Skip to content

PropertyTree: set custom SelectionModel only with valid model #1504

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

v4hn
Copy link
Contributor

@v4hn v4hn commented May 12, 2020

This seems to be a corner-case one might actually call a bug in qt5.
the setSelectionModel(new PropertySelectionModel(nullptr)) call
complains that the SelectionModel and the PropertyTreeView use different
models, although both are set to nullptr in user code.

Qt actually sets the model of QAbstractItemView to
the dummy QAbstractItemModelPrivate::staticEmptyModel, but the
SelectionModel is actually initialized with nullptr.

This seems to be a corner-case one might actually call a bug in qt5.
the `setSelectionModel(new PropertySelectionModel(nullptr))` call
complains that the SelectionModel and the PropertyTreeView use different
models, although both are set to nullptr in user code.

Qt actually sets the model of QAbstractItemView to
the dummy `QAbstractItemModelPrivate::staticEmptyModel`, but the
SelectionModel is actually initialized with `nullptr`.
@v4hn v4hn changed the base branch from hydro-devel to melodic-devel May 12, 2020 11:58
@rhaschke
Copy link
Contributor

@v4hn: What are you doing?

@v4hn v4hn changed the title <!-- Thanks for submitting a Pull Request! PropertyTree: set custom SelectionModel only with valid model May 12, 2020
@v4hn
Copy link
Contributor Author

v4hn commented May 12, 2020

This was hub failing to create a correct pull-request. Sorry for the noise.

@v4hn
Copy link
Contributor Author

v4hn commented May 12, 2020

I just updated the description and target branch.

Copy link
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@rhaschke
Copy link
Contributor

How severe is this issue? Is Qt just printing a warning or is it crashing?

@v4hn
Copy link
Contributor Author

v4hn commented May 12, 2020 via email

@rhaschke rhaschke merged commit 171eb3c into ros-visualization:melodic-devel May 12, 2020
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.

2 participants