Mailinglist Archive: opensuse-programming-de (211 mails)

< Previous Next >
Re: Auf Main Widget zugreifen
  • From: David Haller <lists@xxxxxxxxxx>
  • Date: Sat, 15 Mar 2003 15:33:01 +0100
  • Message-id: <20030315143301.GA1065@xxxxxxxxxxxxxxxxxx>
Hallo,

On Sat, 15 Mar 2003, Holger Macht wrote:
>wie kann ich es erreichen, dass ich auf das MainWIdget von anderen
>Fenstern , dass in main.cpp mit
>a.setMainWidget(...)
>festgelegt wurde, zugreifen kann.

RTFM: qwidget

====
QWidget * QWidget::topLevelWidget () const

Returns the top-level widget for this widget, i.e. the next ancestor
widget that has a window-system frame (or at least may have one).

If the widget is a top-level, the widget itself is returned.

Typical usage is changing the window caption:

aWidget->topLevelWidget()->setCaption( "New Caption" );

See also isTopLevel().
====

-dnh

--
"Sich selbst zu zitieren ist egozentrisch,
selbstherrlich und unsympathisch.
Und ausserdem rekursiv."
(Marian Wild in dieser Sig.) [Marian Wild in dag°]

< Previous Next >
Follow Ups
References