On 15.Mär 2005 - 23:10:40, Oleg Malashenko wrote:
> On Mon, 14 Mar 2005 16:35:47 -0700, Christopher Thompson
> <chris@xxxxxxxxxxxxxxxxx> wrote:
> > On March 14, 2005 01:34 pm, Oleg Malashenko wrote:
> Maybe I'm telling not clear enough, so sorry for my english.
> I want to create a plugin. In that plugin I want to have widget
> (MyLineEdit) with such properties:
> 1. It acts absolutely like QLineEdit
> 2. In the right of that widget there is a button (see pic.1 in my 1st
> 3. There is protected slot, that process button clicked() signal.
> If I subclass QWidget, I'll have to provide interface to QLineEdit.
> Next, if I provide such interface, I'll have to do the same up the class
> hierarchy. Not very comfortable, isn't it? So, I try to subclass QLineEdit.
Hmm, I don't see the problem here? You need about 4 slots to re-emit
the signals of the QLineEdit and all other functions (slots or normal
functions) can be really small stubs that just do a
return m_edit->... Of course this is not that pretty, but the other
way is much more complicated and error prone I think.
In particular you do not need to provide the interfaces of QFrame or
QWidget, as subclassing from QFrame does that...
Your love life will be... interesting.
List archive and information: http://lists.trolltech.com/qt-interest/