Yes every object has a getter and a setter, the setter obviously needs a parameter, but i was refering to how you put the EditTriggers, i put it like this:
Qt Code:
To copy to clipboard, switch view to plain text mode
But it doesn't work.
Yes every object has a getter and a setter, the setter obviously needs a parameter, but i was refering to how you put the EditTriggers, i put it like this:
Qt Code:
To copy to clipboard, switch view to plain text mode
But it doesn't work.
That should work, but for better readability (and safer code) you should use the corresponding enum value called "no edit triggers".
J-P Nurmi
Hi again, i tried to use the NoEditTriggers like this but it doesn work either:
Qt Code:
To copy to clipboard, switch view to plain text mode
But what do you mean by "doesn't work"? Please try to be more specific.
J-P Nurmi
I can still edit the items of the table
Works fine for me:
Qt Code:
// main.cpp #include <QtGui> int main(int argc, char* argv[]) { // uncomment the following line and the table can no more be edited: // table.setEditTriggers(QAbstractItemView::NoEditTriggers); table.show(); return app.exec(); }To copy to clipboard, switch view to plain text mode
J-P Nurmi
rawfool (20th April 2012)
I think it doesn't work because in the part of the options of tha visual form in editTriggers the options of editing with double click was checked, i noticed the existance of this option until now, that's why anything i put in the .cpp didn't work. THANKS FOR ALL THE HELP!!!
![]()
Bookmarks