Thanks for the replies.Yes we are looking for something to embed directly. Using a separate IDE is possible ( we have done it) , but it is a bit awkward for users who are often not Python jedi-masters...
So I took a look at the QSqlTableModel C++ source code, and I noticed that there's an if statement in there that checks if the index has the flag ItemIsEditable set. If it isn't, then it returns false.
Now in the example I was adapting from (Which was this one that is subclassing a QSortFilterProxyModel rather than QSqlTableModel, and was using boolean values and doing other things as well) did NOT set that flag in the overridden flags() method! I assume that's done somewhere else, but I only adapted what I needed. I didn't even know it was a flag you could set since I've never really done this before. Should've looked more carefully at the example I guess...
Anyway, after setting that flag in the flags method it now works as expected. Here's what the method is looking like now if anyone is interested:
Perhaps it may be necessary to rebuild Qtlibrary.
When using Yocto, the layer of meta-qt5-rpi-eglfs is useful.
(However, this is unofficial, and I doesn't tried it with Qt 5.12. Therefore, it may be a build error.)
@ewerybody thank you so much! apologies for the late reply, I didn't get the notifications. I'll make those changes and see how it works, thank you so much, I would never have been able to make those changes myself
In 'def checkanswer(self):' you are connecting to the clicked signal again and connecting to the slot nextword ( self.ui.pushButtonEnter.clicked.connect(self.nextword) ) and in 'def nextword(self):' you are connecting to the clicked signal and checkanswer slot ( self.ui.pushButtonEnter.clicked.connect(self.checkanswer) ). If you want to call 2 functions in the button click, connect the clicked signal to the two slots .
I solved my own problem. I wanted to make it so that I had "Enter your answer" in the text input until the user actually entered something.. BUT you can just select this in QDesigner QTextEdit properties and select 'placeholderText' to properly show a greyed out message prior to input.