1 / 14

L9: Qt Implementation

L9: Qt Implementation. QTextEdit QButton QMainWindow Signal and Slot. QTextEdit. QTextEdit + QButton. QTextEdit + QButton. QMainWindow: Header. QmainWindow: Constructor. QmainWindow: Save Slot. QmainWindow: Open Slot. QmainWindow:Main. API Reference: QIODevice.

Télécharger la présentation

L9: Qt Implementation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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: http://doc.qt.nokia.com/4.7/gettingstartedqt.html [Accessed: 22 January 2011]

More Related