Search code examples
qtqwidget

Qt novice: base class for QLineEdit and QTextEdit


Is there another class besides QWidget which holds all generic functions for both? Something like QEdit...

As an example I'd like to reference cut(), copy() and paste(), but it looks like I have to dynamic cast the QWidget. Is there any other way?


Solution

  • There is no other way besides QWidget. The reason is that QLineEdit is inherited directly from QWidget. You can see the full hierarchy of Qt classes here