学习记录-Qt标准对话框
2015-01-27 10:57
316 查看
Qt中的标准对话框有以下:
1.文件对话框(QFileDialog)
1) 打开目录
4)获取保存文件名
2.颜色对话框(QColorDialog)
3.字体对话框(QFontDialog)
4.输入对话框(QInputDialog)
double getDouble ( QWidget * parent, const QString & title, const QString & label,double value = 0, double min = -2147483647, double max = 2147483647, int decimals = 1, bool * ok = 0, Qt::WindowFlags flags
= 0 )
5.消息对话框(QMessageBox)
6.打印对话框(QPrintDialog)
7.进度对话框(QProgressDialog)
8.错误消息框(QErrorMessage)
1.文件对话框(QFileDialog)
1) 打开目录
QString getExistingDirectory ( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(), Options options = ShowDirsOnly )2)获取文件名
QString getOpenFileName ( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(), const QString & filter = QString(), QString * selectedFilter = 0, Options options = 0 )3)获取目录下所有文件名
QStringList getOpenFileNames ( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(), const QString & filter = QString(), QString * selectedFilter = 0, Options options = 0 )
4)获取保存文件名
QString getSaveFileName ( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(), const QString & filter = QString(), QString * selectedFilter = 0, Options options = 0 )
2.颜色对话框(QColorDialog)
3.字体对话框(QFontDialog)
4.输入对话框(QInputDialog)
double getDouble ( QWidget * parent, const QString & title, const QString & label,double value = 0, double min = -2147483647, double max = 2147483647, int decimals = 1, bool * ok = 0, Qt::WindowFlags flags
= 0 )
int getInt ( QWidget * parent, const QString & title, const QString & label, int value = 0, int min = -2147483647, int max = 2147483647, int step = 1, bool * ok = 0, Qt::WindowFlags flags = 0 ) QString getItem ( QWidget * parent, const QString & title, const QString & label, const QStringList & items, int current = 0, bool editable = true, bool * ok = 0, Qt::WindowFlags flags = 0 ) QString getText ( QWidget * parent, const QString & title, const QString & label, QLineEdit::EchoMode mode = QLineEdit::Normal, const QString & text = QString(), bool * ok = 0, Qt::WindowFlags flags = 0 )
5.消息对话框(QMessageBox)
void about ( QWidget * parent, const QString & title, const QString & text ) void aboutQt ( QWidget * parent, const QString & title = QString() ) StandardButton critical ( QWidget * parent, const QString & title, const QString & text, StandardButtons buttons = Ok, StandardButton defaultButton = NoButton ) StandardButton information ( QWidget * parent, const QString & title, const QString & text, StandardButtons buttons = Ok, StandardButton defaultButton = NoButton ) StandardButton question ( QWidget * parent, const QString & title, const QString & text, StandardButtons buttons = Ok, StandardButton defaultButton = NoButton ) StandardButton warning ( QWidget * parent, const QString & title, const QString & text, StandardButtons buttons = Ok, StandardButton defaultButton = NoButton )
6.打印对话框(QPrintDialog)
7.进度对话框(QProgressDialog)
8.错误消息框(QErrorMessage)
QErrorMessage * qtHandler ()
相关文章推荐
- Qt 学习之路 2(15):标准对话框 QMessageBox
- Qt 学习之路 2(15):标准对话框 QMessageBox
- QT学习 第一章:基本对话框--使用标准输入框
- QT学习——实例1:标准对话框
- Qt学习之十:标准对话框之QMessageBox
- QT学习 之 对话框 (二) 标准输入框
- Qt学习之十二:标准对话框之二QFileDialog文件对话框
- QT学习 第一章:基本对话框--使用标准输入框
- 我的Qt学习之路——标准对话框
- Qt学习记录--04 Qt的对话框介绍
- QT学习 之 对话框 (三) 标准颜色对话框
- Qt学习之路(16): Qt标准对话框之QColorDialog
- Qt学习之路(18): Qt标准对话框之QInputDialog
- Qt标准对话框之 QFileDialog-15
- Qt学习之路(15): Qt标准对话框之QFileDialog
- Qt标准对话框之QMessageBox (转载)
- Qt标准对话框之 QColorDialog-16
- Qt学习之路(15): Qt标准对话框之QFileDialog
- Qt标准对话框之QColorDialog
- Qt标准对话框之 QInputDialog-18