Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

Compatibility Members for QApplication

The following class members are part of the Qt 3 compatibility layer. They are provided to help you port old code to Qt 4. We strongly advise against using them in new code.

QApplication class reference

Public Types

Static Public Members


Member Type Documentation

enum QApplication::ColorMode

QApplication::NormalColors 
QApplication::CustomColors 

Member Function Documentation

ColorMode QApplication::colorMode ()   [static]

Use ColorMode(colorSpec()) instead.

void QApplication::flushX ()   [static]

Use flush() instead.

bool QApplication::hasGlobalMouseTracking ()   [static]

Always returns true. ###

Qt::MacintoshVersion QApplication::macVersion ()   [static]

Use QSysInfo::MacintoshVersion instead.

void QApplication::setColorMode ( ColorMode mode )   [static]

Use setColorSpec(ColorSpec(mode)) instead.

void QApplication::setFont ( const QFont & font, bool b, const char * className = 0 )   [static]

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use the two-argument overload instead.

void QApplication::setGlobalMouseTracking ( bool b )   [static]

###

void QApplication::setPalette ( const QPalette & pal, bool b, const char * className = 0 )   [static]

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use the two-argument overload instead.

void QApplication::setWinStyleHighlightColor ( const QColor & c )   [static]

Use the palette instead.

For example, if you have code like

    app.setWinStyleHighlightColor(color);

you can rewrite it as

    QPalette palette(qApp->palette());
    palette.setColor(QPalette::Highlight, color);
    qApp->setPalette(palette);

QWidget * QApplication::widgetAt ( int x, int y, bool child )   [static]

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use the two-argument widgetAt() overload to get the child widget. To get the top-level widget do this:

    QWidget *widget = qApp->widgetAt(x, y);
    if (widget)
        widget = widget->topLevelWidget();

QWidget * QApplication::widgetAt ( const QPoint & point, bool child )   [static]

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use the single-argument widgetAt() overload to get the child widget. To get the top-level widget do this:

    QWidget *widget = qApp->widgetAt(point);
    if (widget)
        widget = widget->topLevelWidget();

const QColor & QApplication::winStyleHighlightColor ()   [static]

Use qApp->palette().color(QPalette::Active, QPalette::Highlight) instead.

Qt::WindowsVersion QApplication::winVersion ()   [static]

Returns the version of the Windows operating system that is running:

VersionOS
Qt::WV_95Windows 95
Qt::WV_98Windows 98
Qt::WV_MeWindows Me
Qt::WV_NTWindows NT 4.x
Qt::WV_2000Windows 2000 (NT5)
Qt::WV_XPWindows XP
Qt::WV_2003Windows Server 2003 family
Qt::WV_CEWindows CE
Qt::WV_CENETWindows CE.NET

Warning: This function is only implemented for the Windows version of Qt.


Copyright © 2004 Trolltech. Trademarks
Qt 4.0.0-tp2