How to allow copying text from all (including disabled/readOnly) QLineEdit widgets in a window
-
We would like to allow copy operations also all (including "disabled") edit controls:
- We have tried to disable them but this seems to make it generally impossible in Qt to select the content and copy it
- We have tried to make read-only but then it is possible to navigate them using tab and even the initial focus might be set to them
I'm sure we just miss something and it would be great if someone could help us out.
Thank you in advance!
-
In general an enabled widget handles keyboard and mouse events; a disabled widget does not. An exception is made with QAbstractButton. "QWidget":http://qt-project.org/doc/qt-4.8/qwidget.html#enabled-prop. If there aren't a lot of disabled controls, maybe you can have a button that copies content to the clipboard.