That looks great! ... but I'm worried that it would bog down in situations where my model(view) has a large amount of items.
I was thinking that I could paint the resemblance of a QLineEdit in the appropriate locations and open an editor on single- or double-click using delegates and some QStyle magic. I think the fact that I can't find anything on the interwebs that can help me with this must mean it's either a) not that popular, b) difficult, or c) all of the above. My reasoning behind trying this is so that the users of my software (in Maya) won't have to click a lot to figure out which cells/entries are editable as they'll be clearly marked as QLineEdits instead of flat, double-clickable fields. Make sense? Thanks for the help, hoaf On Tue, Feb 18, 2014 at 3:08 AM, Ricardo Viana <[email protected]> wrote: > Here is the link: > > https://gist.github.com/RicardoViana/8961047 > > in the end what makes the editor widgets stay up is this part: > > but like i said if you want the QLineEdit to stay up, it will give you a > blank, waiting for input. > at least that's what i get. > > best > Ricardo > > ------------------------------------------------------------ > > for row in range(0, len(headers)): > self.listWidget.openPersistentEditor(self.model.index(row, 2)) > self.listWidget.openPersistentEditor(self.model.index(row, 3)) > > > ------------------------------------------------------------ > > > > > On Monday, February 17, 2014 8:23:28 PM UTC, Geoff Harvey wrote: >> >> This is actually kind of a follow-up to olheiros' question about item >> delegates. >> >> I'm using a QTreeView to display a QAbstractItemModel with (for now) two >> columns, the first of which is editable. >> >> I'd like to *always* display the first column as a QLineEdit, but I can't >> figure out how to use a QStyledItemDelegate to do so. >> >> Any pointers? I haven't been able to abstract the correct methods from >> the stuff I've found online; could be my google-fu is not very strong. >> >> Thanks a bunch, >> >> hoaf >> >> -- > 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/32359b07-a492-408c-920c-2785d2a588c0%40googlegroups.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > -- 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/CAH5d3sB58MxqUF2EUVkEgrd0b1ivANFCYzVarubgvYefZ%2BTvVQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
