Wild Beasts
2011-11-28 Leave a comment
In “Private Practice: Taming Templates”, I had (deliberately, of course :)) hidden a bug in the implementation of KDGenericFactory
. I’ve now added a discussion about the bug and its fix.
Marc Mutz on Qt, Boost, and C++
2011-11-28 Leave a comment
In “Private Practice: Taming Templates”, I had (deliberately, of course :)) hidden a bug in the implementation of KDGenericFactory
. I’ve now added a discussion about the bug and its fix.
2011-07-26 Leave a comment
The second of my Effective Qt columns, “Prefer to use normalised signal/slot signatures“, just went live on my site.
There is only one guideline this item covers:
Hope you enjoy!
Filed under C++, Effective Qt, English, Qt Tagged with connect, Effective Qt, normalisation, planetkde, QMetaObject, QObject, signal, slot
2010-07-23 3 Comments
The first of my Effective Qt columns, “Don’t be sub-class when subclassing“, just went live on my site.
Here are the guidelines this item covers:
QObject
(directly or indirectly), always add the Q_OBJECT
macro, regardless of whether you also define signals or slots.QObject
constructor ( QObject * parent=0 )
when subclassing QObject
s. Always offer the basic QWidget
constructor ( QWidget * parent=0, Qt::WindowFlags f=0 )
when subclassing QWidget
.QObject
s, end constructor argument lists in QObject * parent=0
. When inheriting QWidget
s, end constructor argument lists in QWidget * parent=0, Qt::WindowFlags f=0
. Add additional arguments at the beginning of the argument list.I hope to make this into a regular column, time permitting.
Filed under C++, Effective Qt, English, Qt Tagged with C++, constructor, Effective Qt, planetkde, QLabel, QMetaObject, QObject, QStyle, Qt, QWidget, Q_OBJECT, subclass