This evening I read the Model/View programming manual. It left me with more questions than answers. First, is there any way to get the code examples in python? I have a very limited understanding of C++ syntax. Also, I understand the Model doesn’t care about the structure of the underlying data, but it can define the indexes of the data for use by the View. You can also have different Views of the same Model. You can also use a Selection in a View to select specific data & then base another View on that Selection. I can understand the logic somewhat, and in some ways, it seems that pandas wouldn’t be needed except maybe for data manipulation, slicing, calculations, etc. is there anything else I can read to get a better understanding of where M/V starts & pandas begins & vice versa?
3 January 2021
id 1201656962This evening I read the Model/View programming manual. It left me with more questions than answers. First, is there any way to get the code examples in python? I have a very limited understanding of C++ syntax. Also, I understand the Model doesn’t care about the structure of the underlying data,
I'm not sure what resources to point you at, but I can expound on the "selection in a view" bit you mention.
There is a class called QSortFilterProxyModel - it allows you to do just that - provide another model class you chain onto your main model, that can filter or sort the model it contains. The main model remains unchanged, but the view can use the sorted/filtered model to display the data.
Welcome David 🎉 🎊
Verify you are not a bot solving the captcha!
Remember to check the documentation page https://doc.qt.io/qtforpython/ and the wiki https://pyside.org if you have some questions.
Welcome David 🎉 🎊
Verify you are not a bot solving the captcha!
Remember to check the documentation page https://doc.qt.io/qtforpython/ and the wiki https://pyside.org if you have some questions.
Ссылка
click to show
click to show
Steve I just create several example using model/ view : https://github.com/dridk/pyside2-examples/tree/main/model
@thecompiler Hi ! From pytest-qt, is it a way to interract with a dialog executed from a function ? Ex: widget.on_set_directory() will launch a QFileDialog . I would like to set the dialog in my test
@thecompiler Ah sorry , I just figured out how it works ! I thought monkeypatch would not answer my problem ! But After a thrird lecture, it works ! And it is fabulous ! I just have to patch my exec_() method !
id 835851715Steve I just create several example using model/ view : https://github.com/dridk/pyside2-examples/tree/main/model
Thanks very much, I will take a look at them.