QDialog Class Reference


The QDialog class is the base class of modal dialog views. (details) (complete member list)

#include <qdialog.h>

Inherits QView.

Inherited by QMessageBox.

Public Members

Protected Members

Protected Slots


Detailed Description

The QDialog class is the base class of modal dialog views.

A dialog widget is a modal view that normally is popped up to get some input from the user. The dialog must be finished before the user can continue with other parts of the program.


Member Function Documentation

QDialog::QDialog (QWidget *parent=0, const char *name=0, WFlags f=WType_Modal)

Constructs a QDialog, named name, which will be a child view of parent. The widget flags f should normally be set to zero unless you know what you are doing.

QDialog::~QDialog ()

Destroys the QDialog and all its children.

void QDialog::accept ()

Closes the dialog and sets the result code to Accepted.

void QDialog::adjustSize ()

Virtual function that adjusts the size of the dialog to fit the contents.

This function will not be called if the dialog has been explicitly resized before showing it.

The default implementation does nothing. Reimplemented in QMessageBox.

void QDialog::done (int r)

Closes the dialog and sets the result code to r.

int QDialog::exec ()

Starts the dialog and returns the result code. Same as calling show(), then result().

void QDialog::keyPressEvent (QKeyEvent *e)

Calls accept() if enter is pressed, or reject() if escape is pressed.

void QDialog::reject ()

Closes the dialog and sets the result code to Rejected.

void QDialog::setDefault (QPushButton *pushButton)

.


This file is part of the Qt toolkit, copyright 1995 Troll Tech, all rights reserved.

It was generated from the following files:


Generated at 16:17, 1995/06/30 by the webmaster at Troll Tech