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

Make model editable please #4

Closed
Climax777 opened this issue Jul 9, 2017 · 3 comments
Closed

Make model editable please #4

Climax777 opened this issue Jul 9, 2017 · 3 comments

Comments

@Climax777
Copy link

Hi and thanks for the library

It would be great if this model were editable.

@dridk
Copy link
Owner

dridk commented Jul 9, 2017

I agree !
Should be easy . Need to find time and motivation !

@marcelino-m
Copy link
Contributor

Done!

@dridk dridk closed this as completed Nov 25, 2018
@tamenol
Copy link

tamenol commented Sep 10, 2020

Where did this get merged/implemented?

When I try to edit a cell I get the error NameError: name '__binding__' is not defined on next lines:

if __binding__ in ("PySide", "PyQt5"):
    self.dataChanged.emit(index, index)
else:
    self.dataChanged.emit(index, index, [Qt.EditRole])

I edited it to

try:
    if __binding__ in ("PySide", "PyQt5"):
        self.dataChanged.emit(index, index)
    else:
        self.dataChanged.emit(index, index, [Qt.EditRole])
except NameError:
    self.dataChanged.emit(index, index, [Qt.EditRole])

And I no longer got the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants