Presentation is loading. Please wait.

Presentation is loading. Please wait.

L9: Qt Implementation QTextEdit QButton QMainWindow Signal and Slot.

Similar presentations


Presentation on theme: "L9: Qt Implementation QTextEdit QButton QMainWindow Signal and Slot."— Presentation transcript:

1 L9: Qt Implementation QTextEdit QButton QMainWindow Signal and Slot

2 QTextEdit

3 QTextEdit + QButton

4 QTextEdit + QButton

5 QMainWindow: Header

6 QmainWindow: Constructor

7 QmainWindow: Save Slot

8 QmainWindow: Open Slot

9 QmainWindow:Main

10 API Reference: QIODevice
The QIODevice class is the base interface class of all I/O devices in Qt. Mostly used IO Mode Flags are listed below. QIODevice::NotOpen : The device is not open. QIODevice::ReadOnly: The device is open for reading. QIODevice::WriteOnly: The device is open for writing. QIODevice::ReadWrite: The device is open for reading and writing. QIODevice::Append: The device is opened in append mode, so that all data is written to the end of the file.

11 API Reference: QFileDialog::getSaveFileName
QString QFileDialog::getSaveFileName( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(), const QString & filter = QString(), QString * selectedFilter = 0, Options options = 0 )

12 API Reference: QFileDialog::getSaveFileName
Caption: The dialog's caption is set to caption. If caption is not specified, a default caption will be used. Dir: The file dialog's working directory will be set to dir. If dir includes a file name, the file will be selected. Filter: Only files that match the filter are shown. Multiple filters are separated with ';;'. For instance:"Images (*.png *.xpm *.jpg);;Text files (*.txt);;XML files (*.xml)" SelectedFilter: The filter selected is set to selectedFilter. Option: The options argument holds various options about how to run the dialog. For instance, QFileDialog::ShowDirsOnly: Only show directories in the file dialog. By default both files and directories are shown. (Valid only in the Directory file mode.) QFileDialog::DontResolveSymlinks: Don't resolve symlinks in the file dialog. By default symlinks are resolved.

13 API Reference: QFileDialog::getOpenFileName
QStringList QfileDialog::getOpenFileName( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(), const QString & filter = QString(), QString * selectedFilter = 0, Options options = 0 )

14 References Qt.Nokia (2011). Qt Reference Documentation: Getting Started. Available from: [Accessed: 22 January 2011]


Download ppt "L9: Qt Implementation QTextEdit QButton QMainWindow Signal and Slot."

Similar presentations


Ads by Google