How can I do, item is read only and not selectable ?
I did this;
item->setFlags( Qt::ItemIsEditable );
item is read only but it is selectable.
How can I do, item is read only and not selectable ?
I did this;
item->setFlags( Qt::ItemIsEditable );
item is read only but it is selectable.
what's the meaning?
i want to do that table widget`s item must be read only and not selectable .
how can i do that ?
Did you try something like this?
Qt Code:
newCell->setFlags( newCell->flags() & !Qt::ItemIsEditable & !Qt::ItemIsSelectable );To copy to clipboard, switch view to plain text mode
Qt Code:
item->setFlags( Qt::ItemIsEnabled );To copy to clipboard, switch view to plain text mode
Works fine for me...
Qt Code:
#include <QListWidget> #include <QApplication> int main(int argc, char **argv){ QListWidget w; item->setText("Selectable"); item->setText("Not selectable"); item->setFlags(Qt::ItemIsEnabled); w.show(); return app.exec(); }To copy to clipboard, switch view to plain text mode
i tried your code. but nothing changed.
what is your qt version wysota ?
i think that problem is in QT 4.4.3 .
but i must use QT 4.4.3 .
i send picture.
selecting item picture.
This is "highlighted", not "selected". If you don't want that as well, disable the ItemIsEnabled flag as well.
How can i closed highlighted ?This is "highlighted", not "selected". If you don't want that as well, disable the ItemIsEnabled flag as well.
i don`t want highlighted.
Look at my previous post, I already told you how to do it.
Bookmarks