Hi, Depending on how you are using the view and expecting it to function, the view usually needs to see the dataChanged signal to know that it should refresh the display of items. You could however use the blockSignals(True) method on your model, then perform the data updates, and then call blockSignals(False). After this, you would probably have to refresh the view to ensure it is displaying correctly.
Justin On Fri Jan 09 2015 at 03:17:06 johan Borgström <[email protected]> wrote: > Hi all! > > (PySide QTableView / QStandardItemModel question) > > The behaviour that I want is that the data set on the last selected item > in the table view will also be set on the previous selected items. > So my idea is to listen for the dataChanged signal and loop through the > selected rows and set the data. > > I realise that this will cause a loop, since I will trigger the > dataChanged signal. What is the best way to approach this? > Subclass the QStandardItemModel and and implement the setData method to > only emit the dataChanged when the user interacts with the item directly? > > Thankful for any suggestions and tips! > > > > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/f7c91608-f455-46eb-9240-ea90c0eb76ae%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/f7c91608-f455-46eb-9240-ea90c0eb76ae%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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0HycErAPRi11tLiOckL7aJz%2BXcLGsV_sgSgGBN3qg73g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
