---
name: "qxtwidget"
section: "3qt"
platform: "linux"
package: "qt-doc"
version: "3:2.3.1-22"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/qxtwidget"
---

# qxtwidget(3qt)

Allows mixing of Xt/Motif and Qt widgets #include \<qxt.h\> Inherits QWidget.

## NAME

QXtWidget - Allows mixing of Xt/Motif and Qt widgets\

`#include <qxt.h>`

Inherits QWidget.

### Public Members

**QXtWidget ( const char \*** *name***, Widget** *parent***, bool** *managed***=FALSE )** \
 **QXtWidget ( const char \*** *name***, WidgetClass** *widget\_class***, QWidget \*** *parent***=0, ArgList** *args***=0, Cardinal** *num\_args***=0, bool** *managed***=FALSE )** \
 **~QXtWidget ()** \
 **Widget xtWidget () const**\
 **bool isActiveWindow () const**\
 **virtual void setActiveWindow ()** \

### Protected Members

**bool x11Event ( XEvent \* )** \

## DESCRIPTION

This class is defined in the **Qt Xt/Motif Extension**, which can be found in the `qt/extensions` directory. It is not included in the main Qt API.

Allows mixing of Xt/Motif and Qt widgets.

QXtWidget acts as a bridge between Xt and Qt. For utilizing old Xt widgets, it can be a QWidget based on a Xt widget class. For including Qt widgets in an existing Xt/Motif application, it can be a special Xt widget class that is a QWidget. See the constructors for the different behaviors.

Examples: mainlyQt/editor.cpp mainlyXt/editor.cpp mainlyMotif/editor.cpp

## MEMBER FUNCTION DOCUMENTATION

## QXtWidget::QXtWidget ( const char \* name, Widget parent, bool managed=FALSE )

Constructs a QXtWidget of the special Xt widget class known as" QWidget" to the resource manager.

Use this constructor to utilize Qt widgets in an Xt/Motif application. The QXtWidget is a QWidget, so you can create subwidgets, layouts, etc. using Qt functionality.

## QXtWidget::QXtWidget ( const char \* name, WidgetClass widget\_class, QWidget \* parent=0, ArgList args=0, Cardinal num\_args=0, bool managed=FALSE )

Constructs a QXtWidget of the given *widget\_class.*

Use this constructor to utilize Xt or Motif widgets in a Qt application. The QXtWidget looks and behaves like the Xt class, but can be used like any QWidget.

Note that Xt requires that the most toplevel Xt widget is a shell. That means, if *parent* is a QXtWidget, the *widget\_class* can be of any kind. If there isn't a parent or the parent is just a normal QWidget, *widget\_class* should be something like `topLevelShellWidgetClass.`

If the *managed* parameter is TRUE and *parent* in not NULL, XtManageChild it used to manage the child.

## QXtWidget::~QXtWidget ()

Destructs the QXtWidget.

## bool QXtWidget::isActiveWindow () const

Different from QWidget::isActiveWindow().

## void QXtWidget::moveEvent ( QMoveEvent \* ) `[virtual protected]`

Reimplemented for internal reasons; the API is not affected.

Reimplemented from QWidget.

## void QXtWidget::resizeEvent ( QResizeEvent \* ) `[virtual protected]`

Reimplemented for internal reasons; the API is not affected.

Examples: mainlyQt/editor.cpp mainlyXt/editor.cpp

Reimplemented from QWidget.

## void QXtWidget::setActiveWindow () `[virtual]`

Implement a degree of focus handling for Xt widgets.

Reimplemented from QWidget.

## bool QXtWidget::x11Event ( XEvent \* e ) `[protected]`

Reimplemented to produce the Xt effect of getting focus when the mouse enters the widget. *This may be changed.*

## Widget QXtWidget::xtWidget () const

Returns the Xt widget equivalent for the Qt widget.

Examples: mainlyXt/editor.cpp mainlyMotif/editor.cpp

## SEE ALSO

**http://doc.trolltech.com/qxtwidget.html** **http://www.trolltech.com/faq/tech.html**

## COPYRIGHT

Copyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See the license file included in the distribution for a complete license statement.

## AUTHOR

Generated automatically from the source code.

## BUGS

If you find a bug in Qt, please report it as described in **http://doc.trolltech.com/bughowto.html**. Good bug reports make our job much simpler. Thank you.

In case of content or formattting problems with this manual page, please report them to **qt-bugs@trolltech.com**. Please include the name of the manual page (qxtwidget.3qt) and the Qt version (2.3.1).
