Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
b60b6e19
Commit
b60b6e19
authored
Apr 20, 2009
by
Kavindra Devi Palaraja
Browse files
Fixes: - Doc more on the tutorial.
parent
ea794ba3
Changes
4
Hide whitespace changes
Inline
Side-by-side
doc/addressbook-sdk.qdoc
View file @
b60b6e19
...
...
@@ -180,12 +180,12 @@
address book is needed.
\section1
Defining t
he AddressBook Class
\section1
T
he AddressBook Class
The \l{examples/addressbook-sdk/part1/addressbook.h}{\c addressbook.h} file
is used to define the \c AddressBook class.
We start by
look
ing
at what is already provided for us by Qt Creator. The
Let's take a
look at what is already provided for us by Qt Creator. The
\c AddressBook class has been defined as a QWidget subclass with a
constructor and destructor.The Q_OBJECT macro is used to indicate that this
class uses internationalization and Qt's signals and slots features.
...
...
@@ -195,31 +195,25 @@
\snippet examples/addressbook-sdk/part1/addressbook.h class definition
Qt Creator's project wizard provides us with the \c Ui object as a way to
access the widgets on our form.
Qt Creator's \gui{Project Wizard} provides us with the \c Ui object as a
way to access the widgets on our form.
The \l{examples/addressbook-sdk/part1/addressbook.cpp}{\c addressbook.cpp}
file is used to implement the \c AddressBook class. The constructor sets up
the \c ui file; the destructor deletes it.
\snippet examples/addressbook-sdk/part1/addressbook.cpp class implementation
\section1 The \c{main()} Function
The \l{examples/addressbook-sdk/part1/main.cpp}{\c main.cpp} file contains
the \c{main()} function It is generated by the \gui{Project Wizard}.
Within this function, a QApplication object, \c a, is instantiated.
QApplication is responsible for various application-wide resources, such as
the default font and cursor, and for running an event loop. Hence, there is
always one QApplication objet in every GUI application using Qt.
\snippet examples/addressbook-sdk/part1/main.cpp main function
*/
doc/examples/addressbook-sdk/part1/addressbook.cpp
View file @
b60b6e19
//! [class implementation]
#include "addressbook.h"
#include "ui_addressbook.h"
...
...
@@ -11,3 +12,4 @@ AddressBook::~AddressBook()
{
delete
ui
;
}
//! [class implementation]
doc/examples/addressbook-sdk/part1/addressbook.h
View file @
b60b6e19
//! [class definition]
#ifndef ADDRESSBOOK_H
#define ADDRESSBOOK_H
...
...
@@ -21,3 +22,4 @@ private:
};
#endif // ADDRESSBOOK_H
//! [class definition]
doc/examples/addressbook-sdk/part1/main.cpp
View file @
b60b6e19
//! [main function]
#include <QtGui/QApplication>
#include "addressbook.h"
...
...
@@ -8,3 +9,4 @@ int main(int argc, char *argv[])
w
.
show
();
return
a
.
exec
();
}
//! [main function]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment