summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/corelib/threads/doc/src/queuedcustomtype.qdoc2
-rw-r--r--examples/corelib/threads/doc/src/semaphores.qdoc2
-rw-r--r--examples/corelib/threads/doc/src/waitconditions.qdoc2
-rw-r--r--examples/corelib/tools/doc/src/contiguouscache.qdoc2
-rw-r--r--examples/dbus/doc/src/complexpingpong.qdoc8
-rw-r--r--examples/network/doc/src/blockingfortuneclient.qdoc2
-rw-r--r--examples/network/doc/src/fortuneclient.qdoc2
-rw-r--r--examples/network/doc/src/googlesuggest.qdoc2
-rw-r--r--examples/network/doc/src/http.qdoc2
-rw-r--r--examples/network/doc/src/loopback.qdoc2
-rw-r--r--examples/network/doc/src/multicastreceiver.qdoc2
-rw-r--r--examples/network/doc/src/multicastsender.qdoc2
-rw-r--r--examples/network/doc/src/network-chat.qdoc2
-rw-r--r--examples/network/doc/src/network-download.qdoc2
-rw-r--r--examples/network/doc/src/network-downloadmanager.qdoc2
-rw-r--r--examples/network/doc/src/securesocketclient.qdoc2
-rw-r--r--examples/network/doc/src/torrent.qdoc2
-rw-r--r--examples/opengl/hellogles3/doc/images/hellogles3-example.pngbin0 -> 61792 bytes
-rw-r--r--examples/opengl/hellogles3/doc/src/hellogles3.qdoc46
-rw-r--r--examples/opengl/hellogles3/glwindow.cpp3
-rw-r--r--examples/opengl/hellogles3/qtlogo.pngbin5402 -> 2318 bytes
-rw-r--r--examples/qtconcurrent/wordcount/doc/src/qtconcurrent-wordcount.qdoc2
-rw-r--r--examples/sql/books/bookwindow.cpp31
-rw-r--r--examples/sql/books/bookwindow.h5
-rw-r--r--examples/sql/books/bookwindow.ui2
-rw-r--r--examples/vulkan/doc/src/hellovulkancubes.qdoc2
-rw-r--r--examples/vulkan/doc/src/hellovulkantexture.qdoc2
-rw-r--r--examples/vulkan/doc/src/hellovulkantriangle.qdoc2
-rw-r--r--examples/vulkan/doc/src/hellovulkanwidget.qdoc2
-rw-r--r--examples/vulkan/doc/src/hellovulkanwindow.qdoc2
-rw-r--r--examples/widgets/doc/src/basicgraphicslayouts.qdoc2
-rw-r--r--examples/widgets/doc/src/blurpicker.qdoc2
-rw-r--r--examples/widgets/doc/src/boxes.qdoc2
-rw-r--r--examples/widgets/doc/src/chip.qdoc2
-rw-r--r--examples/widgets/doc/src/collidingmice-example.qdoc2
-rw-r--r--examples/widgets/doc/src/diagramscene.qdoc2
-rw-r--r--examples/widgets/doc/src/dragdroprobot.qdoc2
-rw-r--r--examples/widgets/doc/src/draggabletext.qdoc2
-rw-r--r--examples/widgets/doc/src/elasticnodes.qdoc2
-rw-r--r--examples/widgets/doc/src/embeddeddialogs.qdoc2
-rw-r--r--examples/widgets/doc/src/extension.qdoc100
-rw-r--r--examples/widgets/doc/src/fademessage.qdoc2
-rw-r--r--examples/widgets/doc/src/findfiles.qdoc2
-rw-r--r--examples/widgets/doc/src/graphicsview-anchorlayout.qdoc2
-rw-r--r--examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc2
-rw-r--r--examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc2
-rw-r--r--examples/widgets/doc/src/padnavigator.qdoc2
-rw-r--r--examples/widgets/doc/src/scribble.qdoc2
-rw-r--r--examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc2
-rw-r--r--examples/widgets/statemachine/factorial/main.cpp2
-rw-r--r--examples/widgets/tutorials/gettingstartedqt.qdoc2
-rw-r--r--examples/widgets/tutorials/notepad/notepad.cpp17
-rw-r--r--examples/widgets/widgets/elidedlabel/testwidget.cpp11
-rw-r--r--examples/xml/dombookmarks/doc/src/dombookmarks.qdoc2
-rw-r--r--examples/xml/saxbookmarks/doc/src/saxbookmarks.qdoc2
-rw-r--r--examples/xml/streambookmarks/doc/src/qxmlstreambookmarks.qdoc2
56 files changed, 213 insertions, 100 deletions
diff --git a/examples/corelib/threads/doc/src/queuedcustomtype.qdoc b/examples/corelib/threads/doc/src/queuedcustomtype.qdoc
index 015007cae1..86d5992294 100644
--- a/examples/corelib/threads/doc/src/queuedcustomtype.qdoc
+++ b/examples/corelib/threads/doc/src/queuedcustomtype.qdoc
@@ -28,7 +28,7 @@
/*!
\example threads/queuedcustomtype
\title Queued Custom Type Example
- \brief Demonstrates multi-thread programming using Qt
+ \brief Demonstrates multi-thread programming using Qt.
\ingroup qtconcurrent-mtexamples
\brief The Queued Custom Type example shows how to send custom types between
diff --git a/examples/corelib/threads/doc/src/semaphores.qdoc b/examples/corelib/threads/doc/src/semaphores.qdoc
index ccbfcdb6e2..5293e80c0e 100644
--- a/examples/corelib/threads/doc/src/semaphores.qdoc
+++ b/examples/corelib/threads/doc/src/semaphores.qdoc
@@ -28,7 +28,7 @@
/*!
\example threads/semaphores
\title Semaphores Example
- \brief Demonstrates multi-thread programming using Qt
+ \brief Demonstrates multi-thread programming using Qt.
\ingroup qtconcurrent-mtexamples
\brief The Semaphores example shows how to use QSemaphore to control
diff --git a/examples/corelib/threads/doc/src/waitconditions.qdoc b/examples/corelib/threads/doc/src/waitconditions.qdoc
index 5a6831ede4..cfac460345 100644
--- a/examples/corelib/threads/doc/src/waitconditions.qdoc
+++ b/examples/corelib/threads/doc/src/waitconditions.qdoc
@@ -28,7 +28,7 @@
/*!
\example threads/waitconditions
\title Wait Conditions Example
- \brief Demonstrates multi-thread programming using Qt
+ \brief Demonstrates multi-thread programming using Qt.
\ingroup qtconcurrent-mtexamples
\brief The Wait Conditions example shows how to use QWaitCondition and
diff --git a/examples/corelib/tools/doc/src/contiguouscache.qdoc b/examples/corelib/tools/doc/src/contiguouscache.qdoc
index c2c686b237..0d06036cd1 100644
--- a/examples/corelib/tools/doc/src/contiguouscache.qdoc
+++ b/examples/corelib/tools/doc/src/contiguouscache.qdoc
@@ -34,7 +34,7 @@
isn't, users still dislike an application using excessive memory.
Using QContiguousCache to manage a list, rather than loading
the entire list into memory, allows the application to limit the amount
- of memory it uses, regardless of the size of the data set it accesses
+ of memory it uses, regardless of the size of the data set it accesses.
The simplest way to use QContiguousCache is to cache as items are requested. When
a view requests an item at row N it is also likely to ask for items at rows near
diff --git a/examples/dbus/doc/src/complexpingpong.qdoc b/examples/dbus/doc/src/complexpingpong.qdoc
index fca654a06a..d09708c0ff 100644
--- a/examples/dbus/doc/src/complexpingpong.qdoc
+++ b/examples/dbus/doc/src/complexpingpong.qdoc
@@ -40,4 +40,12 @@
\include examples-run.qdocinc
To run, execute the \c complexping application.
+
+ \badcode
+ $ ./complexping
+ Ask your question: When is the next Qt release?
+ Reply was: Sorry, I don't know the answer
+ Ask your question: What is the answer to life, the universe and everything?
+ Reply was: 42
+ \endcode
*/
diff --git a/examples/network/doc/src/blockingfortuneclient.qdoc b/examples/network/doc/src/blockingfortuneclient.qdoc
index 6719a4e0b9..ecb9a7ba62 100644
--- a/examples/network/doc/src/blockingfortuneclient.qdoc
+++ b/examples/network/doc/src/blockingfortuneclient.qdoc
@@ -29,7 +29,7 @@
\example blockingfortuneclient
\title Blocking Fortune Client Example
\ingroup examples-network
- \brief Demonstrates how to create a client for a network service
+ \brief Demonstrates how to create a client for a network service.
\image blockingfortuneclient-example.png
diff --git a/examples/network/doc/src/fortuneclient.qdoc b/examples/network/doc/src/fortuneclient.qdoc
index f2ad575125..544fa156b7 100644
--- a/examples/network/doc/src/fortuneclient.qdoc
+++ b/examples/network/doc/src/fortuneclient.qdoc
@@ -29,7 +29,7 @@
\example fortuneclient
\title Fortune Client Example
\ingroup examples-network
- \brief Demonstrates how to create a client for a network service
+ \brief Demonstrates how to create a client for a network service.
This example uses QTcpSocket, and is intended to be run alongside the
\l{fortuneserver}{Fortune Server} example or
diff --git a/examples/network/doc/src/googlesuggest.qdoc b/examples/network/doc/src/googlesuggest.qdoc
index 50cdb694ba..adb87f4b66 100644
--- a/examples/network/doc/src/googlesuggest.qdoc
+++ b/examples/network/doc/src/googlesuggest.qdoc
@@ -29,7 +29,7 @@
\example googlesuggest
\title Google Suggest Example
\ingroup examples-network
- \brief Obtains the list of search recommendations by the Google search engine
+ \brief Obtains the list of search recommendations by the Google search engine.
The example uses the QNetworkAccessManager to obtain the list of search
recommendations by Google as the user types into a QLineEdit.
diff --git a/examples/network/doc/src/http.qdoc b/examples/network/doc/src/http.qdoc
index f4301e7d95..1a70187369 100644
--- a/examples/network/doc/src/http.qdoc
+++ b/examples/network/doc/src/http.qdoc
@@ -29,7 +29,7 @@
\example http
\title HTTP Example
\ingroup examples-network
- \brief Demonstrates a simple HTTP client
+ \brief Demonstrates a simple HTTP client.
This example demonstrates how a simple HTTP client can fetch files
from remote hosts.
diff --git a/examples/network/doc/src/loopback.qdoc b/examples/network/doc/src/loopback.qdoc
index 189c4ee0da..f97c9f9c71 100644
--- a/examples/network/doc/src/loopback.qdoc
+++ b/examples/network/doc/src/loopback.qdoc
@@ -29,7 +29,7 @@
\example loopback
\title Loopback Example
\ingroup examples-network
- \brief Demonstrates the client-server communication on a local host
+ \brief Demonstrates the client-server communication on a local host.
The example demonstrates how the clients and servers on a local host
communicate with each other.
diff --git a/examples/network/doc/src/multicastreceiver.qdoc b/examples/network/doc/src/multicastreceiver.qdoc
index a0579d7284..3709750436 100644
--- a/examples/network/doc/src/multicastreceiver.qdoc
+++ b/examples/network/doc/src/multicastreceiver.qdoc
@@ -29,7 +29,7 @@
\example multicastreceiver
\title Multicast Receiver Example
\ingroup examples-network
- \brief Demonstrates how to receive information sent to a multicast group
+ \brief Demonstrates how to receive information sent to a multicast group.
This example demonstrates how to receive messages sent to a multicast group
\image multicastreceiver-example.png
diff --git a/examples/network/doc/src/multicastsender.qdoc b/examples/network/doc/src/multicastsender.qdoc
index 3adc8959ba..72558eb062 100644
--- a/examples/network/doc/src/multicastsender.qdoc
+++ b/examples/network/doc/src/multicastsender.qdoc
@@ -29,7 +29,7 @@
\example multicastsender
\title Multicast Sender Example
\ingroup examples-network
- \brief Demonstrates how to send messages to a multicast group
+ \brief Demonstrates how to send messages to a multicast group.
This example demonstrates how to send messages to the clients of a
multicast group.
diff --git a/examples/network/doc/src/network-chat.qdoc b/examples/network/doc/src/network-chat.qdoc
index 701dc76ec3..85edf611b6 100644
--- a/examples/network/doc/src/network-chat.qdoc
+++ b/examples/network/doc/src/network-chat.qdoc
@@ -29,7 +29,7 @@
\example network-chat
\title Network Chat Example
\ingroup examples-network
- \brief Demonstrates a stateful peer-to-peer Chat client
+ \brief Demonstrates a stateful peer-to-peer Chat client.
This example uses broadcasting with QUdpSocket and QNetworkInterface to
discover its peers.
diff --git a/examples/network/doc/src/network-download.qdoc b/examples/network/doc/src/network-download.qdoc
index e51da38ed8..9d171e4142 100644
--- a/examples/network/doc/src/network-download.qdoc
+++ b/examples/network/doc/src/network-download.qdoc
@@ -28,7 +28,7 @@
/*!
\example download
\title Network Download Example
- \brief Demonstrates how to use networking APIs for multiple downloads
+ \brief Demonstrates how to use networking APIs for multiple downloads.
\ingroup examples-network
The Network Download example shows how to perform multiple downloads in
diff --git a/examples/network/doc/src/network-downloadmanager.qdoc b/examples/network/doc/src/network-downloadmanager.qdoc
index ca65b8e559..f89ed66616 100644
--- a/examples/network/doc/src/network-downloadmanager.qdoc
+++ b/examples/network/doc/src/network-downloadmanager.qdoc
@@ -28,7 +28,7 @@
/*!
\example downloadmanager
\title Network Download Manager Example
- \brief Demonstrates how to use the networking APIs for multiple downloads
+ \brief Demonstrates how to use the networking APIs for multiple downloads.
\ingroup examples-network
The Network Download example shows how to implement a queue for multiple
diff --git a/examples/network/doc/src/securesocketclient.qdoc b/examples/network/doc/src/securesocketclient.qdoc
index 052e6ad868..78cfab7af4 100644
--- a/examples/network/doc/src/securesocketclient.qdoc
+++ b/examples/network/doc/src/securesocketclient.qdoc
@@ -29,7 +29,7 @@
\example securesocketclient
\title Secure Socket Client Example
\ingroup examples-network
- \brief Demonstrates how to communicate over an encrypted (SSL) connection
+ \brief Demonstrates how to communicate over an encrypted (SSL) connection.
This example uses QSslSocket to demonstrate how to communicate over an
encrypted connection, deal with authenticity problems, and display security
diff --git a/examples/network/doc/src/torrent.qdoc b/examples/network/doc/src/torrent.qdoc
index 2ef5be8171..8d69bee6d1 100644
--- a/examples/network/doc/src/torrent.qdoc
+++ b/examples/network/doc/src/torrent.qdoc
@@ -29,7 +29,7 @@
\example torrent
\title Torrent Example
\ingroup examples-network
- \brief Demonstrates complex TCP/IP operations
+ \brief Demonstrates complex TCP/IP operations.
This example demonstrates some of the complex TCP/IP operations
supported by the Qt Network APIs.
diff --git a/examples/opengl/hellogles3/doc/images/hellogles3-example.png b/examples/opengl/hellogles3/doc/images/hellogles3-example.png
new file mode 100644
index 0000000000..e089b9470a
--- /dev/null
+++ b/examples/opengl/hellogles3/doc/images/hellogles3-example.png
Binary files differ
diff --git a/examples/opengl/hellogles3/doc/src/hellogles3.qdoc b/examples/opengl/hellogles3/doc/src/hellogles3.qdoc
new file mode 100644
index 0000000000..fbe071f143
--- /dev/null
+++ b/examples/opengl/hellogles3/doc/src/hellogles3.qdoc
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example hellogles3
+ \title Hello GLES3 Example
+ \ingroup examples-widgets-opengl
+
+ \brief The Hello GLES3 example demonstrates easy, cross-platform usage of
+ OpenGL ES 3.0 functions via QOpenGLExtraFunctions in an application that
+ works identically on desktop platforms with OpenGL 3.3 and mobile/embedded
+ devices with OpenGL ES 3.0.
+
+ The code is always the same, with the exception of two places:
+ \list
+ \li The OpenGL context creation has to have a sufficiently high version
+ number for the features that are in use.
+ \li The shader code's version directive is different.
+ \endlist
+
+ \image hellogles3-example.png
+*/
diff --git a/examples/opengl/hellogles3/glwindow.cpp b/examples/opengl/hellogles3/glwindow.cpp
index 13cbc41ce8..9458b74810 100644
--- a/examples/opengl/hellogles3/glwindow.cpp
+++ b/examples/opengl/hellogles3/glwindow.cpp
@@ -243,7 +243,8 @@ void GLWindow::initializeGL()
f->glEnableVertexAttribArray(0);
f->glEnableVertexAttribArray(1);
f->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), 0);
- f->glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), reinterpret_cast<void *>(3 * sizeof(GLfloat)));
+ f->glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat),
+ reinterpret_cast<void *>(3 * sizeof(GLfloat)));
m_vbo->release();
f->glEnable(GL_DEPTH_TEST);
diff --git a/examples/opengl/hellogles3/qtlogo.png b/examples/opengl/hellogles3/qtlogo.png
index 868fcea860..9cb2e01d38 100644
--- a/examples/opengl/hellogles3/qtlogo.png
+++ b/examples/opengl/hellogles3/qtlogo.png
Binary files differ
diff --git a/examples/qtconcurrent/wordcount/doc/src/qtconcurrent-wordcount.qdoc b/examples/qtconcurrent/wordcount/doc/src/qtconcurrent-wordcount.qdoc
index 1b112d2966..7486340c7b 100644
--- a/examples/qtconcurrent/wordcount/doc/src/qtconcurrent-wordcount.qdoc
+++ b/examples/qtconcurrent/wordcount/doc/src/qtconcurrent-wordcount.qdoc
@@ -28,7 +28,7 @@
/*!
\example wordcount
\title QtConcurrent Word Count Example
- \brief Demonstrates how to use the map-reduce algorithm
+ \brief Demonstrates how to use the map-reduce algorithm.
\ingroup qtconcurrentexamples
The QtConcurrent Word Count example demonstrates the use of the map-reduce
diff --git a/examples/sql/books/bookwindow.cpp b/examples/sql/books/bookwindow.cpp
index d85b438956..76f3c9da8f 100644
--- a/examples/sql/books/bookwindow.cpp
+++ b/examples/sql/books/bookwindow.cpp
@@ -115,6 +115,11 @@ BookWindow::BookWindow()
ui.genreEdit->setModelColumn(
model->relationModel(genreIdx)->fieldIndex("name"));
+ // Lock and prohibit resizing of the width of the rating column:
+ ui.bookTable->horizontalHeader()->setSectionResizeMode(
+ model->fieldIndex("rating"),
+ QHeaderView::ResizeToContents);
+
QDataWidgetMapper *mapper = new QDataWidgetMapper(this);
mapper->setModel(model);
mapper->setItemDelegate(new BookDelegate(this));
@@ -131,6 +136,7 @@ BookWindow::BookWindow()
);
ui.bookTable->setCurrentIndex(model->index(0, 0));
+ createMenuBar();
}
void BookWindow::showError(const QSqlError &err)
@@ -138,3 +144,28 @@ void BookWindow::showError(const QSqlError &err)
QMessageBox::critical(this, "Unable to initialize Database",
"Error initializing database: " + err.text());
}
+
+void BookWindow::createMenuBar()
+{
+ QAction *quitAction = new QAction(tr("&Quit"), this);
+ QAction *aboutAction = new QAction(tr("&About"), this);
+ QAction *aboutQtAction = new QAction(tr("&About Qt"), this);
+
+ QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+ fileMenu->addAction(quitAction);
+
+ QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
+ helpMenu->addAction(aboutAction);
+ helpMenu->addAction(aboutQtAction);
+
+ connect(quitAction, &QAction::triggered, this, &BookWindow::close);
+ connect(aboutAction, &QAction::triggered, this, &BookWindow::about);
+ connect(aboutQtAction, &QAction::triggered, qApp, &QApplication::aboutQt);
+}
+
+void BookWindow::about()
+{
+ QMessageBox::about(this, tr("About Books"),
+ tr("<p>The <b>Books</b> example shows how to use Qt SQL classes "
+ "with a model/view framework."));
+}
diff --git a/examples/sql/books/bookwindow.h b/examples/sql/books/bookwindow.h
index 4b2be0e729..ec6b935242 100644
--- a/examples/sql/books/bookwindow.h
+++ b/examples/sql/books/bookwindow.h
@@ -63,11 +63,16 @@ class BookWindow: public QMainWindow
public:
BookWindow();
+private slots:
+ void about();
+
private:
void showError(const QSqlError &err);
Ui::BookWindow ui;
QSqlRelationalTableModel *model;
int authorIdx, genreIdx;
+
+ void createMenuBar();
};
#endif
diff --git a/examples/sql/books/bookwindow.ui b/examples/sql/books/bookwindow.ui
index c81a86cb2c..ce8f9f933a 100644
--- a/examples/sql/books/bookwindow.ui
+++ b/examples/sql/books/bookwindow.ui
@@ -33,7 +33,7 @@
<item>
<widget class="QGroupBox" name="groupBox">
<property name="title">
- <string>Books</string>
+ <string/>
</property>
<layout class="QVBoxLayout">
<property name="spacing">
diff --git a/examples/vulkan/doc/src/hellovulkancubes.qdoc b/examples/vulkan/doc/src/hellovulkancubes.qdoc
index 934d2015a1..8fa3243024 100644
--- a/examples/vulkan/doc/src/hellovulkancubes.qdoc
+++ b/examples/vulkan/doc/src/hellovulkancubes.qdoc
@@ -29,7 +29,7 @@
\example hellovulkancubes
\title Hello Vulkan Cubes Example
\ingroup examples-vulkan
- \brief Shows the basics of using QVulkanWindow
+ \brief Shows the basics of using QVulkanWindow.
The \e{Hello Vulkan Cubes Example} shows more advanced usage of QVulkanWindow.
diff --git a/examples/vulkan/doc/src/hellovulkantexture.qdoc b/examples/vulkan/doc/src/hellovulkantexture.qdoc
index d0e0ca90a8..4284e4a05c 100644
--- a/examples/vulkan/doc/src/hellovulkantexture.qdoc
+++ b/examples/vulkan/doc/src/hellovulkantexture.qdoc
@@ -29,7 +29,7 @@
\example hellovulkantexture
\ingroup examples-vulkan
\title Hello Vulkan Texture Vulkan Example
- \brief Shows the basics of rendering with textures in a QVulkanWindow
+ \brief Shows the basics of rendering with textures in a QVulkanWindow.
The \e{Hello Vulkan Texture Example} builds on \l hellovulkantriangle. Here
instead of drawing a single triangle, a triangle strip is drawn in order to
diff --git a/examples/vulkan/doc/src/hellovulkantriangle.qdoc b/examples/vulkan/doc/src/hellovulkantriangle.qdoc
index 81af776ea1..57793cf25a 100644
--- a/examples/vulkan/doc/src/hellovulkantriangle.qdoc
+++ b/examples/vulkan/doc/src/hellovulkantriangle.qdoc
@@ -29,7 +29,7 @@
\example hellovulkantriangle
\ingroup examples-vulkan
\title Hello Vulkan Triangle Example
- \brief Shows the basics of rendering with QVulkanWindow and the Vulkan API
+ \brief Shows the basics of rendering with QVulkanWindow and the Vulkan API.
The \e{Hello Vulkan Triangle Example} builds on \l hellovulkanwindow. This
time a full graphics pipeline is created, including a vertex and fragment
diff --git a/examples/vulkan/doc/src/hellovulkanwidget.qdoc b/examples/vulkan/doc/src/hellovulkanwidget.qdoc
index 7987bdeff9..b5ad43ba2a 100644
--- a/examples/vulkan/doc/src/hellovulkanwidget.qdoc
+++ b/examples/vulkan/doc/src/hellovulkanwidget.qdoc
@@ -29,7 +29,7 @@
\example hellovulkanwidget
\ingroup examples-vulkan
\title Hello Vulkan Widget Example
- \brief Shows the usage of QVulkanWindow in QWidget applications
+ \brief Shows the usage of QVulkanWindow in QWidget applications.
The \e{Hello Vulkan Widget Example} is a variant of \l hellovulkantriangle
that embeds the QVulkanWindow into a QWidget-based user interface using
diff --git a/examples/vulkan/doc/src/hellovulkanwindow.qdoc b/examples/vulkan/doc/src/hellovulkanwindow.qdoc
index 06cc9c1c28..a9682b7e90 100644
--- a/examples/vulkan/doc/src/hellovulkanwindow.qdoc
+++ b/examples/vulkan/doc/src/hellovulkanwindow.qdoc
@@ -29,7 +29,7 @@
\example hellovulkanwindow
\title Hello Vulkan Window Example
\ingroup examples-vulkan
- \brief Shows the basics of using QVulkanWindow
+ \brief Shows the basics of using QVulkanWindow.
The \e{Hello Vulkan Window Example} shows the basics of using QVulkanWindow
in order to display rendering with the Vulkan graphics API on systems that
diff --git a/examples/widgets/doc/src/basicgraphicslayouts.qdoc b/examples/widgets/doc/src/basicgraphicslayouts.qdoc
index 233b8c7c0a..23661d0558 100644
--- a/examples/widgets/doc/src/basicgraphicslayouts.qdoc
+++ b/examples/widgets/doc/src/basicgraphicslayouts.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/basicgraphicslayouts
\title Basic Graphics Layouts Example
\ingroup examples-graphicsview-layout
- \brief Demonstrates how to create basic graphics layout
+ \brief Demonstrates how to create basic graphics layout.
The Basic Graphics Layouts example shows how to use the layout classes
in QGraphicsView: QGraphicsLinearLayout and QGraphicsGridLayout.
diff --git a/examples/widgets/doc/src/blurpicker.qdoc b/examples/widgets/doc/src/blurpicker.qdoc
index 87f36389e7..d4d84f7248 100644
--- a/examples/widgets/doc/src/blurpicker.qdoc
+++ b/examples/widgets/doc/src/blurpicker.qdoc
@@ -29,7 +29,7 @@
\example effects/blurpicker
\title Blur Picker Effect Example
\ingroup examples-graphicsview-graphicseffects
- \brief Demonstrates how to apply graphical effects on items in the view
+ \brief Demonstrates how to apply graphical effects on items in the view.
\image blurpickereffect-example.png
diff --git a/examples/widgets/doc/src/boxes.qdoc b/examples/widgets/doc/src/boxes.qdoc
index 7c9031a003..276c6fa78d 100644
--- a/examples/widgets/doc/src/boxes.qdoc
+++ b/examples/widgets/doc/src/boxes.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/boxes
\title Boxes
\ingroup examples-graphicsview
- \brief Combines advanced OpenGL rendering with the Graphics View framework
+ \brief Combines advanced OpenGL rendering with the Graphics View framework.
\image boxes-demo.png
diff --git a/examples/widgets/doc/src/chip.qdoc b/examples/widgets/doc/src/chip.qdoc
index 4cef4984e3..758b692f0e 100644
--- a/examples/widgets/doc/src/chip.qdoc
+++ b/examples/widgets/doc/src/chip.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/chip
\title 40000 Chips
\ingroup examples-graphicsview
- \brief Visualizes a huge graphic view scene with 40000 chip items
+ \brief Visualizes a huge graphic view scene with 40000 chip items.
This examples demonstrates Graphics View's powerful navigation
and interaction features, allowing you to zoom and rotate each of four
diff --git a/examples/widgets/doc/src/collidingmice-example.qdoc b/examples/widgets/doc/src/collidingmice-example.qdoc
index 535057bb6a..657c416218 100644
--- a/examples/widgets/doc/src/collidingmice-example.qdoc
+++ b/examples/widgets/doc/src/collidingmice-example.qdoc
@@ -28,7 +28,7 @@
/*!
\example graphicsview/collidingmice
\title Colliding Mice Example
- \brief Demonstrates how to animate items on a graphics view
+ \brief Demonstrates how to animate items on a graphics view.
\ingroup examples-graphicsview
The Colliding Mice example shows how to use the Graphics View
diff --git a/examples/widgets/doc/src/diagramscene.qdoc b/examples/widgets/doc/src/diagramscene.qdoc
index 1c9f4faf88..ca4876f2e8 100644
--- a/examples/widgets/doc/src/diagramscene.qdoc
+++ b/examples/widgets/doc/src/diagramscene.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/diagramscene
\title Diagram Scene Example
\ingroup examples-graphicsview
- \brief Demonstrate how to use the Graphics View framework
+ \brief Demonstrate how to use the Graphics View framework.
\image diagramscene.png
diff --git a/examples/widgets/doc/src/dragdroprobot.qdoc b/examples/widgets/doc/src/dragdroprobot.qdoc
index f74b898e1b..ac138072c9 100644
--- a/examples/widgets/doc/src/dragdroprobot.qdoc
+++ b/examples/widgets/doc/src/dragdroprobot.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/dragdroprobot
\title Drag and Drop Robot Example
\ingroup examples-graphicsview
- \brief Demonstrates how to drag and drop items in a graphics view
+ \brief Demonstrates how to drag and drop items in a graphics view.
The Drag and Drop Robot example shows how to implement Drag and Drop in a
QGraphicsItem subclass, as well as how to animate items using Qt's
diff --git a/examples/widgets/doc/src/draggabletext.qdoc b/examples/widgets/doc/src/draggabletext.qdoc
index 97b2f036bd..e934119e7a 100644
--- a/examples/widgets/doc/src/draggabletext.qdoc
+++ b/examples/widgets/doc/src/draggabletext.qdoc
@@ -28,7 +28,7 @@
/*!
\example draganddrop/draggabletext
\title Draggable Text Example
- \brief Illustrates how to drag and drop text between widgets
+ \brief Illustrates how to drag and drop text between widgets.
\brief The Draggable Text example shows how to drag and drop textual data between widgets
in the same application, and between different applications.
diff --git a/examples/widgets/doc/src/elasticnodes.qdoc b/examples/widgets/doc/src/elasticnodes.qdoc
index 65e1195121..e78db67be2 100644
--- a/examples/widgets/doc/src/elasticnodes.qdoc
+++ b/examples/widgets/doc/src/elasticnodes.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/elasticnodes
\title Elastic Nodes Example
\ingroup examples-graphicsview
- \brief Demonstrates how to interact with graphical items in a scene
+ \brief Demonstrates how to interact with graphical items in a scene.
The Elastic Nodes example shows how to implement edges between nodes in a
graph, with basic interaction. You can click to drag a node around, and
diff --git a/examples/widgets/doc/src/embeddeddialogs.qdoc b/examples/widgets/doc/src/embeddeddialogs.qdoc
index 0775c58807..0b31e01e0c 100644
--- a/examples/widgets/doc/src/embeddeddialogs.qdoc
+++ b/examples/widgets/doc/src/embeddeddialogs.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/embeddeddialogs
\title Embedded Dialogs
\ingroup examples-graphicsview-layout
- \brief Demonstrates how to embed dialogs into a graphics view
+ \brief Demonstrates how to embed dialogs into a graphics view.
This example shows how to embed standard dialogs into
Graphics View. It also shows how you can customize the
diff --git a/examples/widgets/doc/src/extension.qdoc b/examples/widgets/doc/src/extension.qdoc
index d040fbb9ce..c895258acf 100644
--- a/examples/widgets/doc/src/extension.qdoc
+++ b/examples/widgets/doc/src/extension.qdoc
@@ -36,23 +36,21 @@
\image extension-example.png Screenshot of the Extension example
- The Extension application is a dialog that allows the user to
- perform a simple search as well as a more advanced search.
+ The Extension application lets the user add search parameters in
+ a dialog and launch a simple or advanced search.
The simple search has two options: \uicontrol {Match case} and \uicontrol
- {Search from start}. The advanced search options include the
- possibilities to search for \uicontrol {Whole words}, \uicontrol {Search
- backward} and \uicontrol {Search selection}. Only the simple search is
- visible when the application starts. The advanced search options
- are located in the application's extension part, and can be made
- visible by pressing the \uicontrol More button:
+ {Search from start}. The advanced search offers search for \uicontrol {Whole words},
+ \uicontrol {Search backward}, and \uicontrol {Search selection}. The
+ application starts with simple search as the default. Click the \uicontrol More button
+ to show the advanced search options:
\image extension_more.png Screenshot of the Extension example
\section1 FindDialog Class Definition
- The \c FindDialog class inherits QDialog. The QDialog class is the
- base class of dialog windows. A dialog window is a top-level
+ The \c FindDialog class inherits QDialog. QDialog is the
+ base class for dialog windows. A dialog window is a top-level
window mostly used for short-term tasks and brief communications
with the user.
@@ -62,45 +60,53 @@
displays the application's search options and controlling
buttons.
- In addition to a constructor, we declare the several child
- widgets: We need a QLineEdit with an associated QLabel to let the
- user type a word to search for, we need several \l
- {QCheckBox}{QCheckBox}es to facilitate the search options, and we
- need three \l {QPushButton}{QPushButton}s: the \uicontrol Find button to
- start a search and the \uicontrol More button to enable an advanced search.
- Finally, we need a QWidget representing the application's extension
- part.
+ In addition to the constructor, there are several child widgets:
+
+ \list
+ \li A QLineEdit with an associated QLabel to let the
+ user type a word to search for.
+ \li Several \l {QCheckBox}{QCheckBox}es to facilitate the search options.
+ \li Three \l {QPushButton}{QPushButton}s:
+ \list
+ \li the \uicontrol Find button to start a search
+ \li the \uicontrol More button to enable an advanced search
+ \li a QWidget representing the application's extension part
+ \endlist
+ \endlist
\section1 FindDialog Class Implementation
- In the constructor we first create the standard child widgets for
- the simple search: the QLineEdit with the associated QLabel, two
- of the \l {QCheckBox}{QCheckBox}es and all the \l
- {QPushButton}{QPushButton}s.
+ Create the standard child widgets for the simple search in the constructor:
+ the QLineEdit with the associated QLabel, two {QCheckBox}es and all the
+ \l {QPushButton}{QPushButton}s.
\snippet dialogs/extension/finddialog.cpp 0
- We give the options and buttons a shortcut key using the &
- character. In the \uicontrol {Find what} option's case, we also need to
- use the QLabel::setBuddy() function to make the shortcut key work
- as expected; then, when the user presses the shortcut key
- indicated by the label, the keyboard focus is transferred to the
- label's buddy widget, the QLineEdit.
-
- We set the \uicontrol Find button's default property to true, using the
+ This snippet illustrates how you can define a shortcut key
+ for a widget. A shortcut should be defined by putting the ampersand
+ character (\c &) in front of the letter that should
+ become the shortcut.
+ For example, for \uicontrol {Find what}, pressing \uicontrol Alt
+ and \uicontrol w transfers focus to the QLineEdit widget.
+ Shortcuts can also be used for checking on or off a checkmark.
+ For example, pressing \uicontrol Alt and \uicontrol c puts the check mark
+ on \uicontrol {Match Case} if it was unchecked and vice versa.
+ It is the QLabel::setBuddy() method that links a widget to the shortcut
+ character if it has been defined.
+
+ Set the \uicontrol Find button's default property to true, using the
QPushButton::setDefault() function. Then the push button will be
pressed if the user presses the Enter (or Return) key. Note that a
QDialog can only have one default button.
\snippet dialogs/extension/finddialog.cpp 2
- Then we create the extension widget, and the \l
- {QCheckBox}{QCheckBox}es associated with the advanced search
- options.
+ Create the extension widget, and the \l {QCheckBox}{QCheckBox}es associated
+ with the advanced search options.
\snippet dialogs/extension/finddialog.cpp 3
- Now that the extension widget is created, we can connect the \uicontrol
+ Now that the extension widget is created, connect the \uicontrol
More button's \l{QAbstractButton::toggled()}{toggled()} signal to
the extension widget's \l{QWidget::setVisible()}{setVisible()} slot.
@@ -111,26 +117,26 @@
the status is true the widget is shown, otherwise the widget is
hidden.
- Since we made the \uicontrol More button checkable when we created it,
- the connection makes sure that the extension widget is shown
- depending on the state of \uicontrol More button.
+ Since the \uicontrol More button is checkable, the connection makes
+ sure that the extension widget is shown depending on the state of
+ the \uicontrol More button.
- We also put the check boxes associated with the advanced
- search options into a layout we install on the extension widget.
+ Create checkboxes associated with the advanced search options in
+ a layout installed on the extension widget.
\snippet dialogs/extension/finddialog.cpp 4
- Before we create the main layout, we create several child layouts
- for the widgets: First we align the QLabel and its buddy, the
- QLineEdit, using a QHBoxLayout. Then we vertically align the
- QLabel and QLineEdit with the check boxes associated with the
- simple search, using a QVBoxLayout. We also create a QVBoxLayout
- for the buttons. In the end we lay out the two latter layouts and
- the extension widget using a QGridLayout.
+ Before creating the main layout, create several child layouts
+ for the widgets. First align the QLabel and its buddy, the
+ QLineEdit, using a QHBoxLayout. Then align the QLabel and the QLineEdit
+ vertically with the checkboxes associated with the simple search,
+ using a QVBoxLayout. Create also a QVBoxLayout for the buttons.
+ Finally, lay out the two latter layouts and the extension widget
+ using a QGridLayout.
\snippet dialogs/extension/finddialog.cpp 5
- Finally, we hide the extension widget using the QWidget::hide()
+ Hide the extension widget using the QWidget::hide()
function, making the application only show the simple search
options when it starts. When the user wants to access the advanced
search options, the dialog only needs to change the visibility of
diff --git a/examples/widgets/doc/src/fademessage.qdoc b/examples/widgets/doc/src/fademessage.qdoc
index 4703dcda30..2035922067 100644
--- a/examples/widgets/doc/src/fademessage.qdoc
+++ b/examples/widgets/doc/src/fademessage.qdoc
@@ -29,7 +29,7 @@
\example effects/fademessage
\title Fade Message Effect Example
\ingroup examples-graphicsview-graphicseffects
- \brief Demonstrates how to apply effects on items in the view
+ \brief Demonstrates how to apply effects on items in the view.
\div { style="text-align: left"}
\inlineimage fademessageeffect-example.png
diff --git a/examples/widgets/doc/src/findfiles.qdoc b/examples/widgets/doc/src/findfiles.qdoc
index ad39b003ae..d7428e7d16 100644
--- a/examples/widgets/doc/src/findfiles.qdoc
+++ b/examples/widgets/doc/src/findfiles.qdoc
@@ -30,7 +30,7 @@
\title Find Files Example
\ingroup examples-dialogs
- \brief A dialog for finding files in a specified folder
+ \brief A dialog for finding files in a specified folder.
The Find Files application allows the user to search for files in a
specified directory, matching a given file name or wildcard,
diff --git a/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc b/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc
index bd27a0dc4f..7933e3c956 100644
--- a/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc
+++ b/examples/widgets/doc/src/graphicsview-anchorlayout.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/anchorlayout
\title Anchor Layout Example
\ingroup examples-graphicsview-layout
- \brief Demonstrates anchor layout in a graphics view scene
+ \brief Demonstrates anchor layout in a graphics view scene.
The Anchor Layout example demonstrates the use of the QGraphicsAnchorLayout
class.
diff --git a/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc b/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc
index fd0427fdc0..27b3f86156 100644
--- a/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc
+++ b/examples/widgets/doc/src/graphicsview-simpleanchorlayout.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/simpleanchorlayout
\title Simple Anchor Layout Example
\ingroup examples-graphicsview-layout
- \brief Demonstrates anchor layout on a graphics view scene
+ \brief Demonstrates anchor layout on a graphics view scene.
The Simple Anchor Layout example shows the basic use of the
QGraphicsAnchorLayout class.
diff --git a/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc b/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc
index fbdd08654d..71ace60355 100644
--- a/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc
+++ b/examples/widgets/doc/src/graphicsview-weatheranchorlayout.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/weatheranchorlayout
\title Weather Anchor Layout Example
\ingroup examples-graphicsview-layout
- \brief Demonstrates anchor layout on a graphics view scene
+ \brief Demonstrates anchor layout on a graphics view scene.
The Weather Anchor Layout example shows more complex use of the
QGraphicsAnchorLayout class to create a real-world window layout.
diff --git a/examples/widgets/doc/src/padnavigator.qdoc b/examples/widgets/doc/src/padnavigator.qdoc
index 017532622a..e59fa3cdbe 100644
--- a/examples/widgets/doc/src/padnavigator.qdoc
+++ b/examples/widgets/doc/src/padnavigator.qdoc
@@ -29,7 +29,7 @@
\example graphicsview/padnavigator
\title Pad Navigator Example
\ingroup examples-graphicsview
- \brief Demonstrates how to create animated user interface
+ \brief Demonstrates how to create animated user interface.
The Pad Navigator Example shows how you can use Graphics View together with
embedded widgets and Qt's \l{The State Machine Framework}{state machine
diff --git a/examples/widgets/doc/src/scribble.qdoc b/examples/widgets/doc/src/scribble.qdoc
index 3b1f8dc895..ca79431334 100644
--- a/examples/widgets/doc/src/scribble.qdoc
+++ b/examples/widgets/doc/src/scribble.qdoc
@@ -149,7 +149,7 @@
For mouse press and mouse release events, we use the
QMouseEvent::button() function to find out which button caused
- the event. For mose move events, we use QMouseEvent::buttons()
+ the event. For mouse move events, we use QMouseEvent::buttons()
to find which buttons are currently held down (as an OR-combination).
If the users press the left mouse button, we store the position
diff --git a/examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc b/examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc
index c5911297f5..0ab578f55c 100644
--- a/examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc
+++ b/examples/widgets/gestures/imagegestures/doc/src/imagegestures.qdoc
@@ -28,7 +28,7 @@
/*!
\example gestures/imagegestures
\title Image Gestures Example
- \brief Demonstrates the use of simple gestures in a widget
+ \brief Demonstrates the use of simple gestures in a widget.
This example shows how to enable gestures for a widget and use gesture input
to perform actions.
diff --git a/examples/widgets/statemachine/factorial/main.cpp b/examples/widgets/statemachine/factorial/main.cpp
index 919988051f..f100aa0110 100644
--- a/examples/widgets/statemachine/factorial/main.cpp
+++ b/examples/widgets/statemachine/factorial/main.cpp
@@ -175,7 +175,7 @@ int main(int argc, char **argv)
//! [6]
machine.setInitialState(compute);
- QObject::connect(&machine, SIGNAL(finished()), &app, SLOT(quit()));
+ QObject::connect(&machine, &QStateMachine::finished, &app, QCoreApplication::quit);
machine.start();
return app.exec();
diff --git a/examples/widgets/tutorials/gettingstartedqt.qdoc b/examples/widgets/tutorials/gettingstartedqt.qdoc
index 921dd7a32d..bbe1dd1a8d 100644
--- a/examples/widgets/tutorials/gettingstartedqt.qdoc
+++ b/examples/widgets/tutorials/gettingstartedqt.qdoc
@@ -28,7 +28,7 @@
/*!
\example tutorials/notepad
\title Getting Started Programming with Qt Widgets
- \brief A tutorial for Qt Widgets based on a notepad application
+ \brief A tutorial for Qt Widgets based on a notepad application.
In this topic, we teach basic Qt knowledge by implementing a simple
Notepad application using C++ and the \l{Qt Widgets} module. The
diff --git a/examples/widgets/tutorials/notepad/notepad.cpp b/examples/widgets/tutorials/notepad/notepad.cpp
index 99a1a52c2b..d0e600e852 100644
--- a/examples/widgets/tutorials/notepad/notepad.cpp
+++ b/examples/widgets/tutorials/notepad/notepad.cpp
@@ -73,6 +73,17 @@ Notepad::Notepad(QWidget *parent) :
{
ui->setupUi(this);
this->setCentralWidget(ui->textEdit);
+
+// Disable menu actions for unavailable features
+#if !QT_CONFIG(printer)
+ ui->actionPrint->setEnabled(false);
+#endif
+
+#if !QT_CONFIG(clipboard)
+ ui->actionCut->setEnabled(false);
+ ui->actionCopy->setEnabled(false);
+ ui->actionPaste->setEnabled(false);
+#endif
}
Notepad::~Notepad()
@@ -161,17 +172,23 @@ void Notepad::on_actionExit_triggered()
void Notepad::on_actionCopy_triggered()
{
+#if QT_CONFIG(clipboard)
ui->textEdit->copy();
+#endif
}
void Notepad::on_actionCut_triggered()
{
+#if QT_CONFIG(clipboard)
ui->textEdit->cut();
+#endif
}
void Notepad::on_actionPaste_triggered()
{
+#if QT_CONFIG(clipboard)
ui->textEdit->paste();
+#endif
}
void Notepad::on_actionUndo_triggered()
diff --git a/examples/widgets/widgets/elidedlabel/testwidget.cpp b/examples/widgets/widgets/elidedlabel/testwidget.cpp
index 50c12374fd..6392a4b4fa 100644
--- a/examples/widgets/widgets/elidedlabel/testwidget.cpp
+++ b/examples/widgets/widgets/elidedlabel/testwidget.cpp
@@ -94,25 +94,25 @@ TestWidget::TestWidget(QWidget *parent):
//! [2]
QPushButton *switchButton = new QPushButton(tr("Switch text"));
- connect(switchButton, SIGNAL(clicked(bool)), this, SLOT(switchText()));
+ connect(switchButton, &QPushButton::clicked, this, &TestWidget::switchText);
QPushButton *exitButton = new QPushButton(tr("Exit"));
- connect(exitButton, SIGNAL(clicked(bool)), this, SLOT(close()));
+ connect(exitButton, &QPushButton::clicked, this, &TestWidget::close);
QLabel *label = new QLabel(tr("Elided"));
label->setVisible(elidedText->isElided());
- connect(elidedText, SIGNAL(elisionChanged(bool)), label, SLOT(setVisible(bool)));
+ connect(elidedText, &ElidedLabel::elisionChanged, label, &QLabel::setVisible);
//! [2]
//! [3]
widthSlider = new QSlider(Qt::Horizontal);
widthSlider->setMinimum(0);
- connect(widthSlider, SIGNAL(valueChanged(int)), this, SLOT(onWidthChanged(int)));
+ connect(widthSlider, &QSlider::valueChanged, this, &TestWidget::onWidthChanged);
heightSlider = new QSlider(Qt::Vertical);
heightSlider->setInvertedAppearance(true);
heightSlider->setMinimum(0);
- connect(heightSlider, SIGNAL(valueChanged(int)), this, SLOT(onHeightChanged(int)));
+ connect(heightSlider, &QSlider::valueChanged, this, &TestWidget::onHeightChanged);
//! [3]
//! [4]
@@ -165,4 +165,3 @@ void TestWidget::onHeightChanged(int height)
}
//! [8]
-
diff --git a/examples/xml/dombookmarks/doc/src/dombookmarks.qdoc b/examples/xml/dombookmarks/doc/src/dombookmarks.qdoc
index e712ac45e9..84ac1723d5 100644
--- a/examples/xml/dombookmarks/doc/src/dombookmarks.qdoc
+++ b/examples/xml/dombookmarks/doc/src/dombookmarks.qdoc
@@ -29,7 +29,7 @@
\example dombookmarks
\title DOM Bookmarks Example
\ingroup xml-examples
- \brief Provides a reader for XML Bookmark Exchange Language files
+ \brief Provides a reader for XML Bookmark Exchange Language files.
The DOM Bookmarks example provides a reader for XML Bookmark Exchange Language (XBEL)
files that uses Qt's DOM-based XML API to read and parse the files. The SAX Bookmarks
diff --git a/examples/xml/saxbookmarks/doc/src/saxbookmarks.qdoc b/examples/xml/saxbookmarks/doc/src/saxbookmarks.qdoc
index ca5ca0adbb..0cd89e641e 100644
--- a/examples/xml/saxbookmarks/doc/src/saxbookmarks.qdoc
+++ b/examples/xml/saxbookmarks/doc/src/saxbookmarks.qdoc
@@ -28,7 +28,7 @@
/*!
\example saxbookmarks
\title SAX Bookmarks Example
- \brief Demonstrates how to read XBEL files
+ \brief Demonstrates how to read XBEL files.
\ingroup xml-examples
This example uses Qt's SAX API to read and parse the files. The DOM Bookmarks
diff --git a/examples/xml/streambookmarks/doc/src/qxmlstreambookmarks.qdoc b/examples/xml/streambookmarks/doc/src/qxmlstreambookmarks.qdoc
index ad093c2098..aa0ddd4991 100644
--- a/examples/xml/streambookmarks/doc/src/qxmlstreambookmarks.qdoc
+++ b/examples/xml/streambookmarks/doc/src/qxmlstreambookmarks.qdoc
@@ -28,7 +28,7 @@
/*!
\example streambookmarks
\title QXmlStream Bookmarks Example
- \brief Demonstrates how to read and write to XBEL files
+ \brief Demonstrates how to read and write to XBEL files.
\ingroup xml-examples
The QXmlStream Bookmarks example provides a reader for XML Bookmark