Discussion:
[Maya-Python] I have questions about the QListView interaction
Eri
2018-11-26 01:57:13 UTC
Permalink
Hey all,

Here I got some questions about PyQT need consult with you.We are doing
some UI development but met difficulties.
1. In the last version we were using
QListView+QStyledItemDelegate+QAbstractListModel as the code to load the
items and these items include lots of custom widgets and the user need do
interaction by using these widets. But the widgets cannot interact when
they are displayed by the QlistView.We read the QT documentation and it
seems like the QListView could only do previw for the viewer while cannot
do interaction,not sure is this correct?
2. I also tried Qlistwidget to meet the interaction requestbut the amount
of the data is too large and performance does not good, not sure how to
optimize.

Above,we really have no idea how to solve the problem,please kindly be
advise.thanks.


Thanks
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Justin Israel
2018-11-26 02:42:16 UTC
Permalink
Post by Eri
Hey all,
Here I got some questions about PyQT need consult with you.We are doing
some UI development but met difficulties.
1. In the last version we were using
QListView+QStyledItemDelegate+QAbstractListModel as the code to load the
items and these items include lots of custom widgets and the user need do
interaction by using these widets. But the widgets cannot interact when
they are displayed by the QlistView.We read the QT documentation and it
seems like the QListView could only do previw for the viewer while cannot
do interaction,not sure is this correct?
This sounds correct to me. It is documented that you can only expect to
display static widgets in the list view, since they are painted directly as
opposed to having each one of them run with event handling.
Post by Eri
2. I also tried Qlistwidget to meet the interaction requestbut the
amount of the data is too large and performance does not good, not sure how
to optimize.
This also lines up with my previous experience with the performance
constraints of a QListWidget.
Post by Eri
Above,we really have no idea how to solve the problem,please kindly be
advise.thanks.
In the past I have done a few apps that have the layout you described by
managing a QVBoxLayout within a scroll widget. This has the downside that
you have to manage the items without the model/view interface. How many
items do you tend to have when you experience performance issues?
Post by Eri
Thanks
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0DbS_AymrTccDRHO%2BQx4jvcNQQstGnp6eG0m%3DNSm3EEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Eri
2018-11-26 03:00:07 UTC
Permalink
100 items, each of which item about 10-20 fields. 15 custom wigets in item

圚 2018幎11月26日星期䞀 UTC+8䞊午10:42:32Justin Israel写道
Post by Justin Israel
Post by Eri
Hey all,
Here I got some questions about PyQT need consult with you.We are doing
some UI development but met difficulties.
1. In the last version we were using
QListView+QStyledItemDelegate+QAbstractListModel as the code to load the
items and these items include lots of custom widgets and the user need do
interaction by using these widets. But the widgets cannot interact when
they are displayed by the QlistView.We read the QT documentation and it
seems like the QListView could only do previw for the viewer while cannot
do interaction,not sure is this correct?
This sounds correct to me. It is documented that you can only expect to
display static widgets in the list view, since they are painted directly as
opposed to having each one of them run with event handling.
Post by Eri
2. I also tried Qlistwidget to meet the interaction requestbut the
amount of the data is too large and performance does not good, not sure how
to optimize.
This also lines up with my previous experience with the performance
constraints of a QListWidget.
Post by Eri
Above,we really have no idea how to solve the problem,please kindly be
advise.thanks.
In the past I have done a few apps that have the layout you described by
managing a QVBoxLayout within a scroll widget. This has the downside that
you have to manage the items without the model/view interface. How many
items do you tend to have when you experience performance issues?
Post by Eri
Thanks
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/935db486-7739-4fd8-9e64-36ffa1ed690c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Justin Israel
2018-11-26 03:49:08 UTC
Permalink
Post by Eri
100 items, each of which item about 10-20 fields. 15 custom wigets in item
Well you could try the QVBoxLayout managed approach. QList{View,Widget}
won't be the right one anyways for dynamic widget items. Its either that or
a custom QGraphicsScene (higher performance)
Post by Eri
圚 2018幎11月26日星期䞀 UTC+8䞊午10:42:32Justin Israel写道
Post by Justin Israel
Post by Eri
Hey all,
Here I got some questions about PyQT need consult with you.We are doing
some UI development but met difficulties.
1. In the last version we were using
QListView+QStyledItemDelegate+QAbstractListModel as the code to load the
items and these items include lots of custom widgets and the user need do
interaction by using these widets. But the widgets cannot interact when
they are displayed by the QlistView.We read the QT documentation and it
seems like the QListView could only do previw for the viewer while cannot
do interaction,not sure is this correct?
This sounds correct to me. It is documented that you can only expect to
display static widgets in the list view, since they are painted directly as
opposed to having each one of them run with event handling.
Post by Eri
2. I also tried Qlistwidget to meet the interaction requestbut the
amount of the data is too large and performance does not good, not sure how
to optimize.
This also lines up with my previous experience with the performance
constraints of a QListWidget.
Post by Eri
Above,we really have no idea how to solve the problem,please kindly be
advise.thanks.
In the past I have done a few apps that have the layout you described by
managing a QVBoxLayout within a scroll widget. This has the downside that
you have to manage the items without the model/view interface. How many
items do you tend to have when you experience performance issues?
Post by Eri
Thanks
--
You received this message because you are subscribed to the Google
Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/935db486-7739-4fd8-9e64-36ffa1ed690c%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/935db486-7739-4fd8-9e64-36ffa1ed690c%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1sTjpYq%2BJFvS%3DK3hjeQMs2_7gHezpFbiGsRAW5NSrSrQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Eri
2018-11-26 03:57:18 UTC
Permalink
What you mean is that the performance of using custom QGraphicsScene is
even higherHow to customize QGraphicsScene?

圚 2018幎11月26日星期䞀 UTC+8䞊午11:49:23Justin Israel写道
Post by Justin Israel
Post by Eri
100 items, each of which item about 10-20 fields. 15 custom wigets in item
Well you could try the QVBoxLayout managed approach. QList{View,Widget}
won't be the right one anyways for dynamic widget items. Its either that or
a custom QGraphicsScene (higher performance)
Post by Eri
圚 2018幎11月26日星期䞀 UTC+8䞊午10:42:32Justin Israel写道
Post by Justin Israel
Post by Eri
Hey all,
Here I got some questions about PyQT need consult with you.We are doing
some UI development but met difficulties.
1. In the last version we were using
QListView+QStyledItemDelegate+QAbstractListModel as the code to load the
items and these items include lots of custom widgets and the user need do
interaction by using these widets. But the widgets cannot interact when
they are displayed by the QlistView.We read the QT documentation and it
seems like the QListView could only do previw for the viewer while cannot
do interaction,not sure is this correct?
This sounds correct to me. It is documented that you can only expect to
display static widgets in the list view, since they are painted directly as
opposed to having each one of them run with event handling.
Post by Eri
2. I also tried Qlistwidget to meet the interaction requestbut the
amount of the data is too large and performance does not good, not sure how
to optimize.
This also lines up with my previous experience with the performance
constraints of a QListWidget.
Post by Eri
Above,we really have no idea how to solve the problem,please kindly be
advise.thanks.
In the past I have done a few apps that have the layout you described by
managing a QVBoxLayout within a scroll widget. This has the downside that
you have to manage the items without the model/view interface. How many
items do you tend to have when you experience performance issues?
Post by Eri
Thanks
--
You received this message because you are subscribed to the Google
Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/935db486-7739-4fd8-9e64-36ffa1ed690c%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/935db486-7739-4fd8-9e64-36ffa1ed690c%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/dc3af376-e747-4a46-aa1b-214bb2a0c933%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Justin Israel
2018-11-26 04:04:50 UTC
Permalink
Post by Eri
What you mean is that the performance of using custom QGraphicsScene is
even higherHow to customize QGraphicsScene?
QGraphicsScene is a more efficient way to do complex interfaces. You get
better performance using it than with QWidget because with QWidget, every
single widget has its own event handling in the chain, and its own paint
event. With QGraphicsScene, there is one big paint event, and it can
efficiently repaint the items that need it.

You can do any kind of crazy interface that you want. See my post from over
8 years ago :-)
http://justinfx.com/2010/03/16/southpark-a-crazy-little-interface-the-taskmonster/
Post by Eri
圚 2018幎11月26日星期䞀 UTC+8䞊午11:49:23Justin Israel写道
Post by Justin Israel
Post by Eri
100 items, each of which item about 10-20 fields. 15 custom wigets in item
Well you could try the QVBoxLayout managed approach. QList{View,Widget}
won't be the right one anyways for dynamic widget items. Its either that or
a custom QGraphicsScene (higher performance)
Post by Eri
圚 2018幎11月26日星期䞀 UTC+8䞊午10:42:32Justin Israel写道
Post by Justin Israel
Post by Eri
Hey all,
Here I got some questions about PyQT need consult with you.We are
doing some UI development but met difficulties.
1. In the last version we were using
QListView+QStyledItemDelegate+QAbstractListModel as the code to load the
items and these items include lots of custom widgets and the user need do
interaction by using these widets. But the widgets cannot interact when
they are displayed by the QlistView.We read the QT documentation and it
seems like the QListView could only do previw for the viewer while cannot
do interaction,not sure is this correct?
This sounds correct to me. It is documented that you can only expect to
display static widgets in the list view, since they are painted directly as
opposed to having each one of them run with event handling.
Post by Eri
2. I also tried Qlistwidget to meet the interaction requestbut the
amount of the data is too large and performance does not good, not sure how
to optimize.
This also lines up with my previous experience with the performance
constraints of a QListWidget.
Post by Eri
Above,we really have no idea how to solve the problem,please kindly be
advise.thanks.
In the past I have done a few apps that have the layout you described
by managing a QVBoxLayout within a scroll widget. This has the downside
that you have to manage the items without the model/view interface. How
many items do you tend to have when you experience performance issues?
Post by Eri
Thanks
--
You received this message because you are subscribed to the Google
Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/935db486-7739-4fd8-9e64-36ffa1ed690c%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/935db486-7739-4fd8-9e64-36ffa1ed690c%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/dc3af376-e747-4a46-aa1b-214bb2a0c933%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/dc3af376-e747-4a46-aa1b-214bb2a0c933%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3MhxozfNdo-7Cn4JAad3%2BumPE_NZi%2BzQv_B5EGfc0icg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Eri
2018-11-26 05:49:11 UTC
Permalink
OKI tried QGraphicsScene. Thanks

圚 2018幎11月26日星期䞀 UTC+8䞋午12:05:06Justin Israel写道
Post by Justin Israel
Post by Eri
What you mean is that the performance of using custom QGraphicsScene is
even higherHow to customize QGraphicsScene?
QGraphicsScene is a more efficient way to do complex interfaces. You get
better performance using it than with QWidget because with QWidget, every
single widget has its own event handling in the chain, and its own paint
event. With QGraphicsScene, there is one big paint event, and it can
efficiently repaint the items that need it.
You can do any kind of crazy interface that you want. See my post from
over 8 years ago :-)
http://justinfx.com/2010/03/16/southpark-a-crazy-little-interface-the-taskmonster/
Post by Eri
圚 2018幎11月26日星期䞀 UTC+8䞊午11:49:23Justin Israel写道
Post by Justin Israel
Post by Eri
100 items, each of which item about 10-20 fields. 15 custom wigets in item
Well you could try the QVBoxLayout managed approach. QList{View,Widget}
won't be the right one anyways for dynamic widget items. Its either that or
a custom QGraphicsScene (higher performance)
Post by Eri
圚 2018幎11月26日星期䞀 UTC+8䞊午10:42:32Justin Israel写道
Post by Justin Israel
Post by Eri
Hey all,
Here I got some questions about PyQT need consult with you.We are
doing some UI development but met difficulties.
1. In the last version we were using
QListView+QStyledItemDelegate+QAbstractListModel as the code to load the
items and these items include lots of custom widgets and the user need do
interaction by using these widets. But the widgets cannot interact when
they are displayed by the QlistView.We read the QT documentation and it
seems like the QListView could only do previw for the viewer while cannot
do interaction,not sure is this correct?
This sounds correct to me. It is documented that you can only expect
to display static widgets in the list view, since they are painted directly
as opposed to having each one of them run with event handling.
Post by Eri
2. I also tried Qlistwidget to meet the interaction requestbut the
amount of the data is too large and performance does not good, not sure how
to optimize.
This also lines up with my previous experience with the performance
constraints of a QListWidget.
Post by Eri
Above,we really have no idea how to solve the problem,please kindly
be advise.thanks.
In the past I have done a few apps that have the layout you described
by managing a QVBoxLayout within a scroll widget. This has the downside
that you have to manage the items without the model/view interface. How
many items do you tend to have when you experience performance issues?
Post by Eri
Thanks
--
You received this message because you are subscribed to the Google
Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it,
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/935db486-7739-4fd8-9e64-36ffa1ed690c%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/935db486-7739-4fd8-9e64-36ffa1ed690c%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/dc3af376-e747-4a46-aa1b-214bb2a0c933%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/dc3af376-e747-4a46-aa1b-214bb2a0c933%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/09099093-313f-45f7-82df-910b30459687%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Eri
2018-11-26 07:50:05 UTC
Permalink
I did a simple test, don't know if this is the case?
https://gist.github.com/EriLee/c0ddfe6f159a373fcb89d6f460f8f8d3

But if you find a problem, there will be a case where BasicWidget() is
multiple instances, so that it doesn‘t increase the load? Is there any
other way?



圚 2018幎11月26日星期䞀 UTC+8䞋午12:05:06Justin Israel写道
Post by Justin Israel
Post by Eri
What you mean is that the performance of using custom QGraphicsScene is
even higherHow to customize QGraphicsScene?
QGraphicsScene is a more efficient way to do complex interfaces. You get
better performance using it than with QWidget because with QWidget, every
single widget has its own event handling in the chain, and its own paint
event. With QGraphicsScene, there is one big paint event, and it can
efficiently repaint the items that need it.
You can do any kind of crazy interface that you want. See my post from
over 8 years ago :-)
http://justinfx.com/2010/03/16/southpark-a-crazy-little-interface-the-taskmonster/
Post by Eri
圚 2018幎11月26日星期䞀 UTC+8䞊午11:49:23Justin Israel写道
Post by Justin Israel
Post by Eri
100 items, each of which item about 10-20 fields. 15 custom wigets in item
Well you could try the QVBoxLayout managed approach. QList{View,Widget}
won't be the right one anyways for dynamic widget items. Its either that or
a custom QGraphicsScene (higher performance)
Post by Eri
圚 2018幎11月26日星期䞀 UTC+8䞊午10:42:32Justin Israel写道
Post by Justin Israel
Post by Eri
Hey all,
Here I got some questions about PyQT need consult with you.We are
doing some UI development but met difficulties.
1. In the last version we were using
QListView+QStyledItemDelegate+QAbstractListModel as the code to load the
items and these items include lots of custom widgets and the user need do
interaction by using these widets. But the widgets cannot interact when
they are displayed by the QlistView.We read the QT documentation and it
seems like the QListView could only do previw for the viewer while cannot
do interaction,not sure is this correct?
This sounds correct to me. It is documented that you can only expect
to display static widgets in the list view, since they are painted directly
as opposed to having each one of them run with event handling.
Post by Eri
2. I also tried Qlistwidget to meet the interaction requestbut the
amount of the data is too large and performance does not good, not sure how
to optimize.
This also lines up with my previous experience with the performance
constraints of a QListWidget.
Post by Eri
Above,we really have no idea how to solve the problem,please kindly
be advise.thanks.
In the past I have done a few apps that have the layout you described
by managing a QVBoxLayout within a scroll widget. This has the downside
that you have to manage the items without the model/view interface. How
many items do you tend to have when you experience performance issues?
Post by Eri
Thanks
--
You received this message because you are subscribed to the Google
Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it,
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/935db486-7739-4fd8-9e64-36ffa1ed690c%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/935db486-7739-4fd8-9e64-36ffa1ed690c%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/dc3af376-e747-4a46-aa1b-214bb2a0c933%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/dc3af376-e747-4a46-aa1b-214bb2a0c933%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/10cfc312-c5b4-40a3-8f7f-82b36c5d2a38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Justin Israel
2018-11-26 09:59:31 UTC
Permalink
Post by Eri
I did a simple test, don't know if this is the case?
https://gist.github.com/EriLee/c0ddfe6f159a373fcb89d6f460f8f8d3
But if you find a problem, there will be a case where BasicWidget() is
multiple instances, so that it doesn‘t increase the load? Is there any
other way?
I am not sure what you mean by not increasing the load. But you will just
have to test this at the scale of the number of items you need. If it works
well with 100 items, then great. Be aware that it can still be expensive to
use QWidgets within QGraphicsScene. But it really just depends how many you
have visible in the view. It can be pretty efficient at only drawing when
it needs to.
Post by Eri
圚 2018幎11月26日星期䞀 UTC+8䞋午12:05:06Justin Israel写道
Post by Justin Israel
Post by Eri
What you mean is that the performance of using custom QGraphicsScene is
even higherHow to customize QGraphicsScene?
QGraphicsScene is a more efficient way to do complex interfaces. You get
better performance using it than with QWidget because with QWidget, every
single widget has its own event handling in the chain, and its own paint
event. With QGraphicsScene, there is one big paint event, and it can
efficiently repaint the items that need it.
You can do any kind of crazy interface that you want. See my post from
over 8 years ago :-)
http://justinfx.com/2010/03/16/southpark-a-crazy-little-interface-the-taskmonster/
Post by Eri
圚 2018幎11月26日星期䞀 UTC+8䞊午11:49:23Justin Israel写道
Post by Justin Israel
Post by Eri
100 items, each of which item about 10-20 fields. 15 custom wigets in item
Well you could try the QVBoxLayout managed approach. QList{View,Widget}
won't be the right one anyways for dynamic widget items. Its either that or
a custom QGraphicsScene (higher performance)
Post by Eri
圚 2018幎11月26日星期䞀 UTC+8䞊午10:42:32Justin Israel写道
Post by Justin Israel
Post by Eri
Hey all,
Here I got some questions about PyQT need consult with you.We are
doing some UI development but met difficulties.
1. In the last version we were using
QListView+QStyledItemDelegate+QAbstractListModel as the code to load the
items and these items include lots of custom widgets and the user need do
interaction by using these widets. But the widgets cannot interact when
they are displayed by the QlistView.We read the QT documentation and it
seems like the QListView could only do previw for the viewer while cannot
do interaction,not sure is this correct?
This sounds correct to me. It is documented that you can only expect
to display static widgets in the list view, since they are painted directly
as opposed to having each one of them run with event handling.
Post by Eri
2. I also tried Qlistwidget to meet the interaction requestbut the
amount of the data is too large and performance does not good, not sure how
to optimize.
This also lines up with my previous experience with the performance
constraints of a QListWidget.
Post by Eri
Above,we really have no idea how to solve the problem,please kindly
be advise.thanks.
In the past I have done a few apps that have the layout you described
by managing a QVBoxLayout within a scroll widget. This has the downside
that you have to manage the items without the model/view interface. How
many items do you tend to have when you experience performance issues?
Post by Eri
Thanks
--
You received this message because you are subscribed to the Google
Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it,
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/61f0065a-8bee-4f7e-9b6f-e0f02fa1b4e3%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/935db486-7739-4fd8-9e64-36ffa1ed690c%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/935db486-7739-4fd8-9e64-36ffa1ed690c%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google
Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/dc3af376-e747-4a46-aa1b-214bb2a0c933%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/dc3af376-e747-4a46-aa1b-214bb2a0c933%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/10cfc312-c5b4-40a3-8f7f-82b36c5d2a38%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/10cfc312-c5b4-40a3-8f7f-82b36c5d2a38%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0HNHcbSL-0dWrimCTCZJhfdnBokYm-piLFmAggRQyo8A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...