Declare abstract signal in interface class

As I found out in the last days… the Qt way of doing this is like this: class IEmitSomething { public: virtual ~IEmitSomething(){} // do not forget this signals: // <- ignored by moc and only serves as documentation aid // The code will work exactly the same if signals: is absent. virtual void someThingHappened() … Read more

Qt signals (QueuedConnection and DirectConnection)

You won’t see much of a difference unless you’re working with objects having different thread affinities. Let’s say you have QObjects A and B and they’re both attached to different threads. A has a signal called somethingChanged() and B has a slot called handleChange(). If you use a direct connection connect( A, SIGNAL(somethingChanged()), B, SLOT(handleChange()), … Read more

Are signals in Qt automatically disconnected when one of the class is deleted

Yes, the QObject::~QObject destructor takes care of that: All signals to and from the object are automatically disconnected, and any pending posted events for the object are removed from the event queue. However, it is often safer to use deleteLater() rather than deleting a QObject subclass directly. Do take care though: Warning: Deleting a QObject … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)