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

SortFilterProxyModel with PyQt #37

Closed
karahman1993 opened this issue Apr 18, 2017 · 5 comments
Closed

SortFilterProxyModel with PyQt #37

karahman1993 opened this issue Apr 18, 2017 · 5 comments

Comments

@karahman1993
Copy link

How do I use this SortFilterProxyModel which is in c ++ with PyQt??

@iberiozko
Copy link

You can use my patch from #25 to build as standalone plugin.

After building you get a libqmlqsortfilterproxymodelplugin.so library. You should put it (and qmldir file) into /usr/qml/QQSFPM/ or whereever your QML plugins live. Then you can do "import QQSFPM 0.2" as usual.

qmldir file:

module QQSFPM
plugin qmlqsortfilterproxymodelplugin

@karahman1993
Copy link
Author

i tried your example, I had this error "could not find the executable, please specify one"
Please i am beginner, Can you Explain more ??

@iberiozko
Copy link

Hmm, let's try.

  1. Checkout code.
  2. Create plugin.cpp and SortFilterProxyModel.pro as in Add feature to build as standalone plugin #25.
  3. qmake
  4. make
  5. You get libqmlqsortfilterproxymodelplugin.so
  6. Put it into /usr/qml/QQSFPM/
  7. Put qmldir file nearby.
  8. Profit.

Feel free to contact me on skype: iberiozko.

@karahman1993
Copy link
Author

karahman1993 commented Apr 19, 2017

@iberiozko i tried but it did not work!!!! so i show you my file "finale":


-finale
----finale.pro
-----SortFilterProxyModel
--------- SortFilterProxyModel.pro
-------- -Header
------------ filter.h
------------ qmlqsortfilterproxymodel.h
------------ sorter.h
-------- -Source
------------ filter.cpp
------------ plugin.cpp
------------ qmlqsortfilterproxymodel.cpp
------------ sorter.cpp
-------- -Sources
------------ main.py
-------- -Ressources
----------- -qml.qrc
--------------- -/
------------------------- main.qml


when i try this, i get : "qmlqsortfilterproxymodelplugin.dll in filder debug" not "libqmlqsortfilterproxymodelplugin.so" so when i put this .dll and qmldir in my folder (stage/finale) and i run my PyQt i get error "module QQSFPM is not installed). so is the bug in the architecture that I showed you ?? or another problem??
thank you

@oKcerG
Copy link
Owner

oKcerG commented Sep 22, 2017

Duplicate of #25

@oKcerG oKcerG marked this as a duplicate of #25 Sep 22, 2017
@oKcerG oKcerG closed this as completed Sep 22, 2017
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

No branches or pull requests

3 participants