QtBase  v6.3.1
Functions | Variables
src_gui_dialogs_qmessagebox.cpp File Reference
#include <QApplication>
#include <QMessageBox>
Include dependency graph for src_gui_dialogs_qmessagebox.cpp:

Go to the source code of this file.

Functions

msgBox setStandardButtons (QMessageBox::Yes|QMessageBox::No)
 
 switch (msgBox.exec())
 
msgBox exec ()
 
 if (msgBox.clickedButton()==connectButton)
 
 if (messageBox.clickedButton()==disconnectButton)
 
int main (int argc, char *argv[])
 [3] More...
 
msgBox setText ("The document has been modified.")
 
msgBox setInformativeText ("Do you want to save your changes?")
 
msgBox setStandardButtons (QMessageBox::Save|QMessageBox::Discard|QMessageBox::Cancel)
 
msgBox setDefaultButton (QMessageBox::Save)
 
 switch (ret)
 [6] More...
 
QMessageBox msgBox (this)
 [7] More...
 
msgBox setText (tr("The document has been modified.\n" "Do you want to save your changes?"))
 

Variables

int ret
 [0] More...
 
QMessageBox msgBox
 [0] More...
 
QPushButtonconnectButton = msgBox.addButton(tr("Connect"), QMessageBox::ActionRole)
 
QPushButtonabortButton = msgBox.addButton(QMessageBox::Abort)
 
QMessageBox messageBox (this)
 [2] More...
 
QAbstractButtondisconnectButton
 

Function Documentation

◆ exec()

msgBox exec ( )
Here is the caller graph for this function:

◆ if() [1/2]

if ( messageBox.  clickedButton() = disconnectButton)

Definition at line 99 of file src_gui_dialogs_qmessagebox.cpp.

◆ if() [2/2]

if ( msgBox.  clickedButton() = connectButton)

Definition at line 85 of file src_gui_dialogs_qmessagebox.cpp.

◆ main()

int main ( int  argc,
char *  argv[] 
)

[3]

[1]

[4]

[0]

[0]

[1]

[1] //! [2]

[2]

[update-ui]

[update-ui]

[init]

[init]

[connect-price-changed]

[connect-price-changed]

[connect-validity-changed]

[connect-validity-changed]

[connect-user]

[connect-user]

[Connect button signals]

[Connect button signals]

[0] [1]

[main start] //! [register meta-type for queued communications]

[register meta-type for queued communications]

[main finish]

[printing a custom type]

[printing a custom type]

[storing a custom value]

[storing a custom value]

[retrieving a custom value]

[retrieving a custom value]

[1]

[1]

[0]

[0]

[1]

[1]

[adding a corner anchor]

[adding a corner anchor]

[adding anchors]

[adding anchors]

[adding anchors to match sizes]

[adding anchors to match sizes]

[0]

[1]

[1] //! [2]

[2]

[3]

[create, position and show]

[create, position and show]

[first part]

[set up the model]

[set up the model] [last part]

[create, resize and show]

[create, resize and show]

[create, lay out widgets and show]

[create, lay out widgets and show]

[0]

[0]

[1]

[1]

[2]

[2]

Definition at line 109 of file src_gui_dialogs_qmessagebox.cpp.

Here is the call graph for this function:

◆ msgBox()

QMessageBox msgBox ( this  )

[7]

[9]

◆ setDefaultButton()

msgBox setDefaultButton ( QMessageBox::Save  )

◆ setInformativeText()

msgBox setInformativeText ( "Do you want to save your changes?"  )

◆ setStandardButtons() [1/2]

◆ setStandardButtons() [2/2]

msgBox setStandardButtons ( QMessageBox::Yes|QMessageBox::No  )

◆ setText() [1/2]

msgBox setText ( "The document has been modified."  )

◆ setText() [2/2]

msgBox setText ( tr("The document has been modified.\n" "Do you want to save your changes?")  )

◆ switch() [1/2]

switch ( msgBox.  exec())

Definition at line 64 of file src_gui_dialogs_qmessagebox.cpp.

Here is the caller graph for this function:

◆ switch() [2/2]

switch ( ret  )

[6]

[7]

Definition at line 135 of file src_gui_dialogs_qmessagebox.cpp.

Variable Documentation

◆ abortButton

QPushButton* abortButton = msgBox.addButton(QMessageBox::Abort)

Definition at line 81 of file src_gui_dialogs_qmessagebox.cpp.

◆ connectButton

QPushButton* connectButton = msgBox.addButton(tr("Connect"), QMessageBox::ActionRole)

Definition at line 80 of file src_gui_dialogs_qmessagebox.cpp.

◆ disconnectButton

QAbstractButton* disconnectButton
Initial value:
=
void addButton(QAbstractButton *button, ButtonRole role)
QMessageBox messageBox(this)
[2]
#define tr(X)

Definition at line 95 of file src_gui_dialogs_qmessagebox.cpp.

◆ messageBox

QMessageBox messageBox(this) ( this  )

[2]

[3]

◆ msgBox

QMessageBox msgBox

[0]

[7]

[4]

[1]

[2]

[5]

[6]

[9]

Definition at line 62 of file src_gui_dialogs_qmessagebox.cpp.

◆ ret

int ret
Initial value:
= QMessageBox::warning(this, tr("My Application"),
tr("The document has been modified.\n"
"Do you want to save your changes?"),
static StandardButton warning(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton)

[0]

Definition at line 52 of file src_gui_dialogs_qmessagebox.cpp.