Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void QCoreApplication::setAttribute ( Qt::ApplicationAttribute  attribute,
bool  on = true 
) [static]

Sets the attribute attribute if on is true; otherwise clears the attribute.

One of the attributes that can be set with this method is Qt::AA_ImmediateWidgetCreation. It tells Qt to create toplevel windows immediately. Normally, resources for widgets are allocated on demand to improve efficiency and minimize resource usage. Therefore, if it is important to minimize resource consumption, do not set this attribute.

See also:
testAttribute()

Definition at line 501 of file qcoreapplication.cpp.

{
    if (on)
        QCoreApplicationPrivate::attribs |= 1 << attribute;
    else
        QCoreApplicationPrivate::attribs &= ~(1 << attribute);
}


Generated by  Doxygen 1.6.0   Back to index