HOWTO - Qt
Debug messages
#include <QtDebug> qDebug() << "something"; // #define QT_NO_DEBUG_OUTPUT qWarning() << "something"; qFatal() << "something"; // + exit the application
Spojový seznam
QList<QString> list; list << "foo" << "bar" << "baz"; foreach(QString s, list) qDebug() << s;
Třída se signály a sloty
class MyClass : public QObject { Q_OBJECT public slots: protected slots: private slots: signals: };
Vlákna
QThread::run() QThread::start() QThread::wait() QThread::isFinished() QThread::isRunning() QThread::terminate() QThread::finished() // signál QMutex::lock() QMutex::tryLock() QMutex::unlock() QMutexLocker::QMutexLocker(QMutex* mutex) QReadWriteLock::lockForRead() QReadWriteLock::lockForWrite() QReadLocker::QReadLocker(QReadWriteLock* lock) QWriteLocker::QWriteLocker(QReadWriteLock* lock) QSemaphore::acquire() QSemaphore::tryAcquire() QSemaphore::release() QWaitCondition::wait() QWaitCondition::wakeAll() QWaitCondition::wakeOne() QAtomicInt http://doc.trolltech.com/4.5/threads.html
Copyright © 2001-2011 Michal Turek <WOQ (zavináč) seznam.cz>
Valid XHTML 1.0 Strict, Valid CSS