- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Friends

# QThread Class Reference

Search for all occurrences

## Detailed Description

Definition at line 59 of file qthread.h.

`#include <qthread.h>`

Inheritance diagram for QThread:
[legend]

List of all members.

## Public Types
enum | Priority { IdlePriority, LowestPriority, LowPriority, NormalPriority, HighPriority, HighestPriority, TimeCriticalPriority, InheritPriority }
## Public Slots
void | start (Priority=InheritPriority)
void | terminate ()
void | quit ()
## Signals
void | started ()
void | finished ()
void | terminated ()
## Public Member Functions
| QThread (QObject *parent=0)
| ~QThread ()
void | setPriority (Priority priority)
Priority | priority () const
bool | isFinished () const
bool | isRunning () const
void | setStackSize (uint stackSize)
uint | stackSize () const
void | exit (int retcode=0)
bool | wait (unsigned long time=ULONG_MAX)
## Static Public Member Functions
static Qt::HANDLE | currentThreadId ()
static QThread * | currentThread ()
static int | idealThreadCount ()
static void | yieldCurrentThread ()
## Protected Member Functions
virtual void | run ()
int | exec ()
| QThread (QThreadPrivate &dd, QObject *parent=0)
## Static Protected Member Functions
static void | setTerminationEnabled (bool enabled=true)
static void | sleep (unsigned long)
static void | msleep (unsigned long)
static void | usleep (unsigned long)
## Friends
class | QCoreApplication
class | QThreadData

## Member Enumeration Documentation

enum Priority

Search for all occurrences

Enumerator:

  IdlePriority | Search for all occurrences
  LowestPriority | Search for all occurrences
  LowPriority | Search for all occurrences
  NormalPriority | Search for all occurrences
  HighPriority | Search for all occurrences
  HighestPriority | Search for all occurrences
  TimeCriticalPriority | Search for all occurrences
  InheritPriority | Search for all occurrences

Definition at line 70 of file qthread.h.

                      {
            IdlePriority,

            LowestPriority,
            LowPriority,
            NormalPriority,
            HighPriority,
            HighestPriority,

            TimeCriticalPriority,

            InheritPriority
        };

## Constructor & Destructor Documentation

QThread | ( | QObject * | parent = `0` | ) | `[explicit]`

~QThread | ( |  | ) |

QThread | ( | QThreadPrivate & | dd,
|  | QObject * | parent = `0`
| ) |  | `[protected]`

## Member Function Documentation

static Qt::HANDLE currentThreadId | ( |  | ) | `[static]`

Search for all occurrences

static QThread* currentThread | ( |  | ) | `[static]`

Search for all occurrences

static int idealThreadCount | ( |  | ) | `[static]`

Search for all occurrences

static void yieldCurrentThread | ( |  | ) | `[static]`

Search for all occurrences

void setPriority | ( | Priority | priority | ) |

Search for all occurrences

Priority priority | ( |  | ) | const

Search for all occurrences

bool isFinished | ( |  | ) | const

Search for all occurrences

bool isRunning | ( |  | ) | const

Search for all occurrences

void setStackSize | ( | uint | stackSize | ) |

Search for all occurrences

uint stackSize | ( |  | ) | const

Search for all occurrences

void exit | ( | int | retcode = `0` | ) |

Search for all occurrences

void start | ( | Priority | = `InheritPriority` | ) | `[slot]`

Search for all occurrences

void terminate | ( |  | ) | `[slot]`

Search for all occurrences

void quit | ( |  | ) | `[slot]`

Search for all occurrences

bool wait | ( | unsigned long | time = `ULONG_MAX` | ) |

Search for all occurrences

void started | ( |  | ) | `[signal]`

Search for all occurrences

void finished | ( |  | ) | `[signal]`

Search for all occurrences

void terminated | ( |  | ) | `[signal]`

Search for all occurrences

virtual void run | ( |  | ) | `[protected, virtual]`

Search for all occurrences

int exec | ( |  | ) | `[protected]`

Search for all occurrences

static void setTerminationEnabled | ( | bool | enabled = `true` | ) | `[static, protected]`

Search for all occurrences

static void sleep | ( | unsigned | long | ) | `[static, protected]`

Search for all occurrences

static void msleep | ( | unsigned | long | ) | `[static, protected]`

Search for all occurrences

static void usleep | ( | unsigned | long | ) | `[static, protected]`

Search for all occurrences

## Friends And Related Function Documentation

friend class QCoreApplication `[friend]`

Search for all occurrences

Reimplemented from QObject.

Definition at line 135 of file qthread.h.

friend class QThreadData `[friend]`

Search for all occurrences

Reimplemented from QObject.

Definition at line 136 of file qthread.h.

The documentation for this class was generated from the following file:

- QtCore/qthread.h

QThread QThread QThread QThread QThread QThread QThread QThread QThread QThread
QThread QThread QThread QThread QThread QThread QThread QThread QThread QThread