Add getMultiLineText static method to QInputDialog
Change-Id: I6d43772f6ee66c6c43d64fb3d18f2a5f0c894a00 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
parent
7ed024226f
commit
cc54161abb
@ -121,6 +121,10 @@ Dialog::Dialog(QWidget *parent)
|
|||||||
textLabel->setFrameStyle(frameStyle);
|
textLabel->setFrameStyle(frameStyle);
|
||||||
QPushButton *textButton = new QPushButton(tr("QInputDialog::get&Text()"));
|
QPushButton *textButton = new QPushButton(tr("QInputDialog::get&Text()"));
|
||||||
|
|
||||||
|
multiLineTextLabel = new QLabel;
|
||||||
|
multiLineTextLabel->setFrameStyle(frameStyle);
|
||||||
|
QPushButton *multiLineTextButton = new QPushButton(tr("QInputDialog::get&MultiLineText()"));
|
||||||
|
|
||||||
colorLabel = new QLabel;
|
colorLabel = new QLabel;
|
||||||
colorLabel->setFrameStyle(frameStyle);
|
colorLabel->setFrameStyle(frameStyle);
|
||||||
QPushButton *colorButton = new QPushButton(tr("QColorDialog::get&Color()"));
|
QPushButton *colorButton = new QPushButton(tr("QColorDialog::get&Color()"));
|
||||||
@ -177,6 +181,7 @@ Dialog::Dialog(QWidget *parent)
|
|||||||
connect(doubleButton, SIGNAL(clicked()), this, SLOT(setDouble()));
|
connect(doubleButton, SIGNAL(clicked()), this, SLOT(setDouble()));
|
||||||
connect(itemButton, SIGNAL(clicked()), this, SLOT(setItem()));
|
connect(itemButton, SIGNAL(clicked()), this, SLOT(setItem()));
|
||||||
connect(textButton, SIGNAL(clicked()), this, SLOT(setText()));
|
connect(textButton, SIGNAL(clicked()), this, SLOT(setText()));
|
||||||
|
connect(multiLineTextButton, SIGNAL(clicked()), this, SLOT(setMultiLineText()));
|
||||||
connect(colorButton, SIGNAL(clicked()), this, SLOT(setColor()));
|
connect(colorButton, SIGNAL(clicked()), this, SLOT(setColor()));
|
||||||
connect(fontButton, SIGNAL(clicked()), this, SLOT(setFont()));
|
connect(fontButton, SIGNAL(clicked()), this, SLOT(setFont()));
|
||||||
connect(directoryButton, SIGNAL(clicked()),
|
connect(directoryButton, SIGNAL(clicked()),
|
||||||
@ -206,7 +211,9 @@ Dialog::Dialog(QWidget *parent)
|
|||||||
layout->addWidget(itemLabel, 2, 1);
|
layout->addWidget(itemLabel, 2, 1);
|
||||||
layout->addWidget(textButton, 3, 0);
|
layout->addWidget(textButton, 3, 0);
|
||||||
layout->addWidget(textLabel, 3, 1);
|
layout->addWidget(textLabel, 3, 1);
|
||||||
layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding), 4, 0);
|
layout->addWidget(multiLineTextButton, 4, 0);
|
||||||
|
layout->addWidget(multiLineTextLabel, 4, 1);
|
||||||
|
layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding), 5, 0);
|
||||||
toolbox->addItem(page, tr("Input Dialogs"));
|
toolbox->addItem(page, tr("Input Dialogs"));
|
||||||
|
|
||||||
const QString doNotUseNativeDialog = tr("Do not use native dialog");
|
const QString doNotUseNativeDialog = tr("Do not use native dialog");
|
||||||
@ -327,6 +334,17 @@ void Dialog::setText()
|
|||||||
//! [3]
|
//! [3]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Dialog::setMultiLineText()
|
||||||
|
{
|
||||||
|
//! [4]
|
||||||
|
bool ok;
|
||||||
|
QString text = QInputDialog::getMultiLineText(this, tr("QInputDialog::getMultiLineText()"),
|
||||||
|
tr("Address:"), "John Doe\nFreedom Street", &ok);
|
||||||
|
if (ok && !text.isEmpty())
|
||||||
|
multiLineTextLabel->setText(text);
|
||||||
|
//! [4]
|
||||||
|
}
|
||||||
|
|
||||||
void Dialog::setColor()
|
void Dialog::setColor()
|
||||||
{
|
{
|
||||||
const QColorDialog::ColorDialogOptions options = QFlag(colorDialogOptionsWidget->value());
|
const QColorDialog::ColorDialogOptions options = QFlag(colorDialogOptionsWidget->value());
|
||||||
|
@ -63,6 +63,7 @@ private slots:
|
|||||||
void setDouble();
|
void setDouble();
|
||||||
void setItem();
|
void setItem();
|
||||||
void setText();
|
void setText();
|
||||||
|
void setMultiLineText();
|
||||||
void setColor();
|
void setColor();
|
||||||
void setFont();
|
void setFont();
|
||||||
void setExistingDirectory();
|
void setExistingDirectory();
|
||||||
@ -80,6 +81,7 @@ private:
|
|||||||
QLabel *doubleLabel;
|
QLabel *doubleLabel;
|
||||||
QLabel *itemLabel;
|
QLabel *itemLabel;
|
||||||
QLabel *textLabel;
|
QLabel *textLabel;
|
||||||
|
QLabel *multiLineTextLabel;
|
||||||
QLabel *colorLabel;
|
QLabel *colorLabel;
|
||||||
QLabel *fontLabel;
|
QLabel *fontLabel;
|
||||||
QLabel *directoryLabel;
|
QLabel *directoryLabel;
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
#include "qlabel.h"
|
#include "qlabel.h"
|
||||||
#include "qlayout.h"
|
#include "qlayout.h"
|
||||||
#include "qlineedit.h"
|
#include "qlineedit.h"
|
||||||
|
#include "qplaintextedit.h"
|
||||||
#include "qlistwidget.h"
|
#include "qlistwidget.h"
|
||||||
#include "qpushbutton.h"
|
#include "qpushbutton.h"
|
||||||
#include "qspinbox.h"
|
#include "qspinbox.h"
|
||||||
@ -167,6 +168,7 @@ public:
|
|||||||
|
|
||||||
void ensureLayout();
|
void ensureLayout();
|
||||||
void ensureLineEdit();
|
void ensureLineEdit();
|
||||||
|
void ensurePlainTextEdit();
|
||||||
void ensureComboBox();
|
void ensureComboBox();
|
||||||
void ensureListView();
|
void ensureListView();
|
||||||
void ensureIntSpinBox();
|
void ensureIntSpinBox();
|
||||||
@ -180,11 +182,13 @@ public:
|
|||||||
void ensureLayout() const { const_cast<QInputDialogPrivate *>(this)->ensureLayout(); }
|
void ensureLayout() const { const_cast<QInputDialogPrivate *>(this)->ensureLayout(); }
|
||||||
bool useComboBoxOrListView() const { return comboBox && comboBox->count() > 0; }
|
bool useComboBoxOrListView() const { return comboBox && comboBox->count() > 0; }
|
||||||
void _q_textChanged(const QString &text);
|
void _q_textChanged(const QString &text);
|
||||||
|
void _q_plainTextEditTextChanged();
|
||||||
void _q_currentRowChanged(const QModelIndex &newIndex, const QModelIndex &oldIndex);
|
void _q_currentRowChanged(const QModelIndex &newIndex, const QModelIndex &oldIndex);
|
||||||
|
|
||||||
mutable QLabel *label;
|
mutable QLabel *label;
|
||||||
mutable QDialogButtonBox *buttonBox;
|
mutable QDialogButtonBox *buttonBox;
|
||||||
mutable QLineEdit *lineEdit;
|
mutable QLineEdit *lineEdit;
|
||||||
|
mutable QPlainTextEdit *plainTextEdit;
|
||||||
mutable QSpinBox *intSpinBox;
|
mutable QSpinBox *intSpinBox;
|
||||||
mutable QDoubleSpinBox *doubleSpinBox;
|
mutable QDoubleSpinBox *doubleSpinBox;
|
||||||
mutable QComboBox *comboBox;
|
mutable QComboBox *comboBox;
|
||||||
@ -198,8 +202,8 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
QInputDialogPrivate::QInputDialogPrivate()
|
QInputDialogPrivate::QInputDialogPrivate()
|
||||||
: label(0), buttonBox(0), lineEdit(0), intSpinBox(0), doubleSpinBox(0), comboBox(0), listView(0),
|
: label(0), buttonBox(0), lineEdit(0), plainTextEdit(0), intSpinBox(0), doubleSpinBox(0),
|
||||||
inputWidget(0), mainLayout(0)
|
comboBox(0), listView(0), inputWidget(0), mainLayout(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,6 +254,21 @@ void QInputDialogPrivate::ensureLineEdit()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QInputDialogPrivate::ensurePlainTextEdit()
|
||||||
|
{
|
||||||
|
Q_Q(QInputDialog);
|
||||||
|
if (!plainTextEdit) {
|
||||||
|
plainTextEdit = new QPlainTextEdit(q);
|
||||||
|
plainTextEdit->setLineWrapMode(QPlainTextEdit::NoWrap);
|
||||||
|
#ifndef QT_NO_IM
|
||||||
|
qt_widget_private(plainTextEdit)->inheritsInputMethodHints = 1;
|
||||||
|
#endif
|
||||||
|
plainTextEdit->hide();
|
||||||
|
QObject::connect(plainTextEdit, SIGNAL(textChanged()),
|
||||||
|
q, SLOT(_q_plainTextEditTextChanged()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void QInputDialogPrivate::ensureComboBox()
|
void QInputDialogPrivate::ensureComboBox()
|
||||||
{
|
{
|
||||||
Q_Q(QInputDialog);
|
Q_Q(QInputDialog);
|
||||||
@ -344,6 +363,8 @@ void QInputDialogPrivate::setInputWidget(QWidget *widget)
|
|||||||
// textValue
|
// textValue
|
||||||
if (widget == lineEdit) {
|
if (widget == lineEdit) {
|
||||||
lineEdit->setText(textValue);
|
lineEdit->setText(textValue);
|
||||||
|
} else if (widget == plainTextEdit) {
|
||||||
|
plainTextEdit->setPlainText(textValue);
|
||||||
} else if (widget == comboBox) {
|
} else if (widget == comboBox) {
|
||||||
setComboBoxText(textValue);
|
setComboBoxText(textValue);
|
||||||
} else if (widget == listView) {
|
} else if (widget == listView) {
|
||||||
@ -364,6 +385,9 @@ void QInputDialogPrivate::chooseRightTextInputWidget()
|
|||||||
} else {
|
} else {
|
||||||
widget = comboBox;
|
widget = comboBox;
|
||||||
}
|
}
|
||||||
|
} else if (opts & QInputDialog::UsePlainTextEditForTextInput) {
|
||||||
|
ensurePlainTextEdit();
|
||||||
|
widget = plainTextEdit;
|
||||||
} else {
|
} else {
|
||||||
ensureLineEdit();
|
ensureLineEdit();
|
||||||
widget = lineEdit;
|
widget = lineEdit;
|
||||||
@ -417,6 +441,16 @@ void QInputDialogPrivate::_q_textChanged(const QString &text)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QInputDialogPrivate::_q_plainTextEditTextChanged()
|
||||||
|
{
|
||||||
|
Q_Q(QInputDialog);
|
||||||
|
QString text = plainTextEdit->toPlainText();
|
||||||
|
if (textValue != text) {
|
||||||
|
textValue = text;
|
||||||
|
emit q->textValueChanged(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void QInputDialogPrivate::_q_currentRowChanged(const QModelIndex &newIndex,
|
void QInputDialogPrivate::_q_currentRowChanged(const QModelIndex &newIndex,
|
||||||
const QModelIndex & /* oldIndex */)
|
const QModelIndex & /* oldIndex */)
|
||||||
{
|
{
|
||||||
@ -434,8 +468,8 @@ void QInputDialogPrivate::_q_currentRowChanged(const QModelIndex &newIndex,
|
|||||||
The input value can be a string, a number or an item from a list. A label
|
The input value can be a string, a number or an item from a list. A label
|
||||||
must be set to tell the user what they should enter.
|
must be set to tell the user what they should enter.
|
||||||
|
|
||||||
Four static convenience functions are provided: getText(), getInt(),
|
Five static convenience functions are provided: getText(), getMultiLineText(),
|
||||||
getDouble(), and getItem(). All the functions can be used in a similar way,
|
getInt(), getDouble(), and getItem(). All the functions can be used in a similar way,
|
||||||
for example:
|
for example:
|
||||||
|
|
||||||
\snippet dialogs/standarddialogs/dialog.cpp 3
|
\snippet dialogs/standarddialogs/dialog.cpp 3
|
||||||
@ -575,6 +609,8 @@ QString QInputDialog::labelText() const
|
|||||||
\value NoButtons Don't display \uicontrol{OK} and \uicontrol{Cancel} buttons (useful for "live dialogs").
|
\value NoButtons Don't display \uicontrol{OK} and \uicontrol{Cancel} buttons (useful for "live dialogs").
|
||||||
\value UseListViewForComboBoxItems Use a QListView rather than a non-editable QComboBox for
|
\value UseListViewForComboBoxItems Use a QListView rather than a non-editable QComboBox for
|
||||||
displaying the items set with setComboBoxItems().
|
displaying the items set with setComboBoxItems().
|
||||||
|
\value UsePlainTextEditForTextInput Use a QPlainTextEdit for multiline text input. This value was
|
||||||
|
introduced in 5.2.
|
||||||
|
|
||||||
\sa options, setOption(), testOption()
|
\sa options, setOption(), testOption()
|
||||||
*/
|
*/
|
||||||
@ -628,6 +664,8 @@ void QInputDialog::setOptions(InputDialogOptions options)
|
|||||||
d->buttonBox->setVisible(!(options & NoButtons));
|
d->buttonBox->setVisible(!(options & NoButtons));
|
||||||
if ((changed & UseListViewForComboBoxItems) && inputMode() == TextInput)
|
if ((changed & UseListViewForComboBoxItems) && inputMode() == TextInput)
|
||||||
d->chooseRightTextInputWidget();
|
d->chooseRightTextInputWidget();
|
||||||
|
if ((changed & UsePlainTextEditForTextInput) && inputMode() == TextInput)
|
||||||
|
d->chooseRightTextInputWidget();
|
||||||
}
|
}
|
||||||
|
|
||||||
QInputDialog::InputDialogOptions QInputDialog::options() const
|
QInputDialog::InputDialogOptions QInputDialog::options() const
|
||||||
@ -653,6 +691,8 @@ void QInputDialog::setTextValue(const QString &text)
|
|||||||
setInputMode(TextInput);
|
setInputMode(TextInput);
|
||||||
if (d->inputWidget == d->lineEdit) {
|
if (d->inputWidget == d->lineEdit) {
|
||||||
d->lineEdit->setText(text);
|
d->lineEdit->setText(text);
|
||||||
|
} else if (d->inputWidget == d->plainTextEdit) {
|
||||||
|
d->plainTextEdit->setPlainText(text);
|
||||||
} else if (d->inputWidget == d->comboBox) {
|
} else if (d->inputWidget == d->comboBox) {
|
||||||
d->setComboBoxText(text);
|
d->setComboBoxText(text);
|
||||||
} else {
|
} else {
|
||||||
@ -1075,6 +1115,8 @@ void QInputDialog::setVisible(bool visible)
|
|||||||
d->inputWidget->setFocus();
|
d->inputWidget->setFocus();
|
||||||
if (d->inputWidget == d->lineEdit) {
|
if (d->inputWidget == d->lineEdit) {
|
||||||
d->lineEdit->selectAll();
|
d->lineEdit->selectAll();
|
||||||
|
} else if (d->inputWidget == d->plainTextEdit) {
|
||||||
|
d->plainTextEdit->selectAll();
|
||||||
} else if (d->inputWidget == d->intSpinBox) {
|
} else if (d->inputWidget == d->intSpinBox) {
|
||||||
d->intSpinBox->selectAll();
|
d->intSpinBox->selectAll();
|
||||||
} else if (d->inputWidget == d->doubleSpinBox) {
|
} else if (d->inputWidget == d->doubleSpinBox) {
|
||||||
@ -1144,7 +1186,7 @@ void QInputDialog::done(int result)
|
|||||||
want to do this, you should create the dialog yourself using one of the
|
want to do this, you should create the dialog yourself using one of the
|
||||||
QInputDialog constructors.
|
QInputDialog constructors.
|
||||||
|
|
||||||
\sa getInt(), getDouble(), getItem()
|
\sa getInt(), getDouble(), getItem(), getMultiLineText()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QString QInputDialog::getText(QWidget *parent, const QString &title, const QString &label,
|
QString QInputDialog::getText(QWidget *parent, const QString &title, const QString &label,
|
||||||
@ -1168,6 +1210,58 @@ QString QInputDialog::getText(QWidget *parent, const QString &title, const QStri
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\since 5.2
|
||||||
|
|
||||||
|
Static convenience function to get a multiline string from the user.
|
||||||
|
|
||||||
|
\a title is the text which is displayed in the title bar of the dialog.
|
||||||
|
\a label is the text which is shown to the user (it should say what should
|
||||||
|
be entered).
|
||||||
|
\a text is the default text which is placed in the plain text edit.
|
||||||
|
\a inputMethodHints is the input method hints that will be used in the
|
||||||
|
edit widget if an input method is active.
|
||||||
|
|
||||||
|
If \a ok is nonnull \e *\a ok will be set to true if the user pressed
|
||||||
|
\uicontrol OK and to false if the user pressed \uicontrol Cancel. The dialog's parent
|
||||||
|
is \a parent. The dialog will be modal and uses the specified widget
|
||||||
|
\a flags.
|
||||||
|
|
||||||
|
If the dialog is accepted, this function returns the text in the dialog's
|
||||||
|
plain text edit. If the dialog is rejected, a null QString is returned.
|
||||||
|
|
||||||
|
Use this static function like this:
|
||||||
|
|
||||||
|
\snippet dialogs/standarddialogs/dialog.cpp 4
|
||||||
|
|
||||||
|
\warning Do not delete \a parent during the execution of the dialog. If you
|
||||||
|
want to do this, you should create the dialog yourself using one of the
|
||||||
|
QInputDialog constructors.
|
||||||
|
|
||||||
|
\sa getInt(), getDouble(), getItem(), getText()
|
||||||
|
*/
|
||||||
|
|
||||||
|
QString QInputDialog::getMultiLineText(QWidget *parent, const QString &title, const QString &label,
|
||||||
|
const QString &text, bool *ok, Qt::WindowFlags flags,
|
||||||
|
Qt::InputMethodHints inputMethodHints)
|
||||||
|
{
|
||||||
|
QInputDialog dialog(parent, flags);
|
||||||
|
dialog.setOptions(QInputDialog::UsePlainTextEditForTextInput);
|
||||||
|
dialog.setWindowTitle(title);
|
||||||
|
dialog.setLabelText(label);
|
||||||
|
dialog.setTextValue(text);
|
||||||
|
dialog.setInputMethodHints(inputMethodHints);
|
||||||
|
|
||||||
|
int ret = dialog.exec();
|
||||||
|
if (ok)
|
||||||
|
*ok = !!ret;
|
||||||
|
if (ret) {
|
||||||
|
return dialog.textValue();
|
||||||
|
} else {
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\since 4.5
|
\since 4.5
|
||||||
|
|
||||||
@ -1196,7 +1290,7 @@ QString QInputDialog::getText(QWidget *parent, const QString &title, const QStri
|
|||||||
want to do this, you should create the dialog yourself using one of the
|
want to do this, you should create the dialog yourself using one of the
|
||||||
QInputDialog constructors.
|
QInputDialog constructors.
|
||||||
|
|
||||||
\sa getText(), getDouble(), getItem()
|
\sa getText(), getDouble(), getItem(), getMultiLineText()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int QInputDialog::getInt(QWidget *parent, const QString &title, const QString &label, int value,
|
int QInputDialog::getInt(QWidget *parent, const QString &title, const QString &label, int value,
|
||||||
@ -1248,7 +1342,7 @@ int QInputDialog::getInt(QWidget *parent, const QString &title, const QString &l
|
|||||||
want to do this, you should create the dialog yourself using one of the
|
want to do this, you should create the dialog yourself using one of the
|
||||||
QInputDialog constructors.
|
QInputDialog constructors.
|
||||||
|
|
||||||
\sa getText(), getDouble(), getItem()
|
\sa getText(), getDouble(), getItem(), getMultiLineText()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -1277,7 +1371,7 @@ int QInputDialog::getInt(QWidget *parent, const QString &title, const QString &l
|
|||||||
want to do this, you should create the dialog yourself using one of the
|
want to do this, you should create the dialog yourself using one of the
|
||||||
QInputDialog constructors.
|
QInputDialog constructors.
|
||||||
|
|
||||||
\sa getText(), getInt(), getItem()
|
\sa getText(), getInt(), getItem(), getMultiLineText()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
double QInputDialog::getDouble(QWidget *parent, const QString &title, const QString &label,
|
double QInputDialog::getDouble(QWidget *parent, const QString &title, const QString &label,
|
||||||
@ -1331,7 +1425,7 @@ double QInputDialog::getDouble(QWidget *parent, const QString &title, const QStr
|
|||||||
want to do this, you should create the dialog yourself using one of the
|
want to do this, you should create the dialog yourself using one of the
|
||||||
QInputDialog constructors.
|
QInputDialog constructors.
|
||||||
|
|
||||||
\sa getText(), getInt(), getDouble()
|
\sa getText(), getInt(), getDouble(), getMultiLineText()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
QString QInputDialog::getItem(QWidget *parent, const QString &title, const QString &label,
|
QString QInputDialog::getItem(QWidget *parent, const QString &title, const QString &label,
|
||||||
|
@ -79,7 +79,8 @@ class Q_WIDGETS_EXPORT QInputDialog : public QDialog
|
|||||||
public:
|
public:
|
||||||
enum InputDialogOption {
|
enum InputDialogOption {
|
||||||
NoButtons = 0x00000001,
|
NoButtons = 0x00000001,
|
||||||
UseListViewForComboBoxItems = 0x00000002
|
UseListViewForComboBoxItems = 0x00000002,
|
||||||
|
UsePlainTextEditForTextInput = 0x00000004
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_FLAGS(InputDialogOptions, InputDialogOption)
|
Q_DECLARE_FLAGS(InputDialogOptions, InputDialogOption)
|
||||||
@ -168,6 +169,9 @@ public:
|
|||||||
QLineEdit::EchoMode echo = QLineEdit::Normal,
|
QLineEdit::EchoMode echo = QLineEdit::Normal,
|
||||||
const QString &text = QString(), bool *ok = 0, Qt::WindowFlags flags = 0,
|
const QString &text = QString(), bool *ok = 0, Qt::WindowFlags flags = 0,
|
||||||
Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
|
Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
|
||||||
|
static QString getMultiLineText(QWidget *parent, const QString &title, const QString &label,
|
||||||
|
const QString &text = QString(), bool *ok = 0, Qt::WindowFlags flags = 0,
|
||||||
|
Qt::InputMethodHints inputMethodHints = Qt::ImhNone);
|
||||||
static QString getItem(QWidget *parent, const QString &title, const QString &label,
|
static QString getItem(QWidget *parent, const QString &title, const QString &label,
|
||||||
const QStringList &items, int current = 0, bool editable = true,
|
const QStringList &items, int current = 0, bool editable = true,
|
||||||
bool *ok = 0, Qt::WindowFlags flags = 0,
|
bool *ok = 0, Qt::WindowFlags flags = 0,
|
||||||
@ -204,6 +208,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(QInputDialog)
|
Q_DISABLE_COPY(QInputDialog)
|
||||||
Q_PRIVATE_SLOT(d_func(), void _q_textChanged(const QString&))
|
Q_PRIVATE_SLOT(d_func(), void _q_textChanged(const QString&))
|
||||||
|
Q_PRIVATE_SLOT(d_func(), void _q_plainTextEditTextChanged())
|
||||||
Q_PRIVATE_SLOT(d_func(), void _q_currentRowChanged(const QModelIndex&, const QModelIndex&))
|
Q_PRIVATE_SLOT(d_func(), void _q_currentRowChanged(const QModelIndex&, const QModelIndex&))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user