返回介绍

QXtWidget Class

发布于 2019-10-04 15:04:19 字数 3718 浏览 820 评论 0 收藏 0

The QXtWidget class allows mixing of Xt/Motif and Qt widgets.

This class is part of the Qt Xt/Motif Extension. More...

#include <qxt.h>

Inherits QWidget.

List of all member functions.

Public Members

  • QXtWidget ( constchar*name, Widgetparent, boolmanaged = FALSE )
  • QXtWidget ( constchar*name, WidgetClasswidget_class, QWidget*parent = 0, ArgListargs = 0, Cardinalnum_args = 0, boolmanaged = FALSE )
  • ~QXtWidget ()
  • Widget xtWidget () const
  • bool isActiveWindow () const
  • virtual void setActiveWindow ()

Protected Members

  • virtual bool x11Event ( XEvent*e )

Detailed 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.

The QXtWidget class 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.


Member Function Documentation

QXtWidget::QXtWidget ( constchar*name, Widgetparent, boolmanaged = 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.

The name is the object name passed to the QWidget constructor. The widget's parent is parent.

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

QXtWidget::QXtWidget ( constchar*name, WidgetClasswidget_class, QWidget*parent = 0, ArgListargs = 0, Cardinalnum_args = 0, boolmanaged = FALSE )

Constructs a QXtWidget of the given widget_class called name.

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 top level Xt widget is a shell. This 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.

The arguments, args, num_args are passed on to XtCreateWidget.

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::setActiveWindow () [virtual]

Implement a degree of focus handling for Xt widgets.

Reimplemented from QWidget.

bool QXtWidget::x11Event ( XEvent*e ) [virtual protected]

Reimplemented to produce the Xt effect of getting focus when the mouse enters the widget. The event is passed in e.

This function is under development and is subject to change.

Reimplemented from QWidget.

Widget QXtWidget::xtWidget () const

Returns the Xt widget equivalent for the Qt widget.

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文