summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-11-03 21:27:02 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-11-04 06:57:29 +0100
commit255cc9abfbc5bb8fd91b6ba5f2d8e82a62c2f96f (patch)
treea3b4ef01fb3990eb71444743720413ec865599d0 /src
parent317145af84c055cf019c84b9090f53bd8c61c5da (diff)
Initial porting guide for QtGui and QtPrintSupport
Additional porting documentation for QtWidgets. Task-number: QTBUG-88149 Task-number: QTBUG-88151 Change-Id: Ia28f01a8d8d6eaee9d8f08af1a54b76e57620cab Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/doc/src/qt6-changes.qdoc61
-rw-r--r--src/printsupport/doc/src/qt6-changes.qdoc8
-rw-r--r--src/widgets/doc/src/qt6-changes.qdoc17
3 files changed, 71 insertions, 15 deletions
diff --git a/src/gui/doc/src/qt6-changes.qdoc b/src/gui/doc/src/qt6-changes.qdoc
index 630530c3c7..a3cafaa1c3 100644
--- a/src/gui/doc/src/qt6-changes.qdoc
+++ b/src/gui/doc/src/qt6-changes.qdoc
@@ -41,6 +41,65 @@
In this topic we summarize those changes in Qt GUI, and provide
guidance to handle them.
- \section1 ADD STUFF HERE
+ \section1 Kernel classes
+ \section2 QBitmap
+
+ Implicit construction of a QBitmap from a QPixmap is no longer supported.
+ The constructor and assignment operator have been made explicit and marked as
+ deprecated. Use the new static factory function \l{QBitmap::}{fromPixmap} instead.
+
+ \section2 QCursor
+
+ Implicit construction of a QCursor from a QPixmap is no longer supported, the
+ constructor has been made explicit.
+
+ \section2 QKeyCombination
+
+ QKeyCombination is a new class for storing a combination of a key with an
+ optional modifier. It should be used as a replacement for combining values from
+ the Qt::Key enum with a modifier in a type-safe way.
+
+ We recommend migrating code that currently uses operator+() to combine a key and
+ modifiers, as future C++ standards are likely to declare arithmetic operations
+ between unrelated enumeration types as illegal. Use operator|(), and change
+ APIs that expect an \c int to expect a QKeyCombination instead.
+
+ Existing APIs that expect an \c int for a key combination can be called using
+ QKeyCombination::toCombined().
+
+ \section1 Text classes
+
+ \section2 QFontDatabase
+
+ The QFontDatabase class has now only static member functions. The constructor
+ has been deprecated. Instead of e.g.
+
+ \code
+ const QStringList fontFamilies = QFontDatabase().families();
+ \endcode
+
+ use
+
+ \code
+ const QStringList fontFamilies = QFontDatabase::families();
+ \endcode
+
+ \section2 QFont
+
+ The numerical values of the QFont::Weight enumerator have been changed to
+ be in line with OpenType weight values. QFont::setWeight() expects an enum value
+ instead of an \c int, and code that calls the setter with an integer will fail to
+ compile. To continue to use old integer values, use QFont::setLegacyWeight().
+
+ \section1 Painting classes
+
+ See the porting guide for \l{Porting to Qt 6 - Qt Print Support}{Qt Print Support} for
+ information about \l{QPagedPaintDevice} and other printing related classes.
+
+ \section1 Utility classes
+
+ \section2 QIntValidator and QDoubleValidator
+
+ The \l{QIntValidator::}{setRange()} method is no longer marked as virtual.
*/
diff --git a/src/printsupport/doc/src/qt6-changes.qdoc b/src/printsupport/doc/src/qt6-changes.qdoc
index 88b77b3759..cf38c741dc 100644
--- a/src/printsupport/doc/src/qt6-changes.qdoc
+++ b/src/printsupport/doc/src/qt6-changes.qdoc
@@ -41,6 +41,12 @@
In this topic we summarize those changes in Qt Print Support, and provide
guidance to handle them.
- \section1 ADD STUFF HERE
+ \section1 General API consolidation
+ The various enums and types for \l{QPageSize}{page sizes},
+ margins, and orientation have been consolidated. QPrinter APIs to set
+ paper sizes and margins explicitly have been removed; use
+ QPagedPaintDevice::setPageLayout(), QPagedPaintDevice::setPageSize(),
+ QPagedPaintDevice::setPageOrientation(), and
+ QPagedPaintDevice::setPageMargins() instead.
*/
diff --git a/src/widgets/doc/src/qt6-changes.qdoc b/src/widgets/doc/src/qt6-changes.qdoc
index 681d9a3813..ad7e371594 100644
--- a/src/widgets/doc/src/qt6-changes.qdoc
+++ b/src/widgets/doc/src/qt6-changes.qdoc
@@ -69,11 +69,6 @@
QAction::setMenu()) are implemented as templates that will be instantiated
only when called.
- \section2 QPixmap, QBitmap, and QCursor
-
- QBitmap and QCursor can no longer be implicitly created from a QPixmap; use
- the explicit constructor and factory function instead.
-
\section1 Widgets
\section2 QAbstractButton
@@ -92,14 +87,10 @@
The various initStyleOption() methods in widget classes are now virtual.
- \section1 Printing Classes
+ \section1 Utility Classes
- \section2 QPagedPaintDevice, QPrinter, QPageSize, QPageLayout
+ \section2 QUndoCommand, QUndoStack, and QUndoGroup
- The various enums and types for \l{QPageSize}{page sizes},
- margins, and orientation have been consolidated. QPrinter APIs to set
- paper sizes and margins explicitly have been removed; use
- QPagedPaintDevice::setPageLayout(), QPagedPaintDevice::setPageSize(),
- QPagedPaintDevice::setPageOrientation(), and
- QPagedPaintDevice::setPageMargins() instead.
+ The widget independent classes of the Undo/Redo framework have been moved
+ into the QtGui module.
*/