Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Fonctions  · 

QXtWidget Class Reference
[obsolete]

The QXtWidget class allows mixing of Xt/Motif and Qt widgets. This class is obsolete. It is provided to keep old source working. We strongly advise against using it in new code. More...

This class is part of the Qt Motif Extension.

#include <qxtwidget.h>

Inherits QWidget.

List of all member functions.

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

  • virtual bool x11Event ( XEvent * e )

Detailed Description

This class is defined in the Qt 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. This class is obsolete. It is provided to keep old source working. We strongly advise against using it in new code.

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.

Known QXtWidget Problems

This class is unsupported and has many known problems and limitations. It is provided only to keep existing source working; it should not be used in new code. Note: These problems will not be fixed in future releases.

Below is an imcomplete list of know issues:

  1. Keyboard focus navigation is impossible when using QXtWidget. The mouse must be used to focus widgets in both Qt and Xt/Motif widgets. For example, when embedding a QXtWidget into an Xt/Motif widget, key events will go to the QXtWidget (and its children) while the mouse is over the QXtWidget, regardless of where Xt/Motif has placed the focus.

  2. Reparenting does not work. You cannot use QWidget::reparent(). This includes the functions QWidget::showFullScreen() and QWidget::showNormal(), which use QWidget::reparent().


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.

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

Reimplemented from QWidget.

Widget QXtWidget::xtWidget () const

Returns the Xt widget equivalent for the Qt widget.


This file is part of the Qt toolkit. Copyright © 1995-2005 Trolltech. All Rights Reserved.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 3.3
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web