Fix a typo to properly link to setInputMask instead setMask.
Task-number: QTBUG-61775
Change-Id: I0cb00de8dcaece613467e25b41e93661d6e98308
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
It seems there is a subtle bug in the Wacom tablet drivers for Windows that is
triggered in the very particular case where the running executable is named
"tablet.exe", regardless of its installation path. It causes WM_POINTER*
messages not to be delivered to the application, initially, but only after the
application's window is reselected, after another application's window had
been selected. It happens at least on Windows 10 systems with Wacom Bamboo
tablets and drivers, and was reproduced with non-Qt-based applications also.
It looks like a bad compatibility setting that makes "tablet" a cursed target
name for applications using tablet functionality. It seems older versions of
the drivers used to contain an executable with this name, although it seems to
be absent in newer versions. Unfortunately, the Qt tablet example uses this
name, which breaks it when used with upcoming WM_POINTER* messages support.
Change-Id: I931cc725b9117b4604267f7b0172110ae61700de
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Fix wrong QRegExp in Custom Sort/Filter Model Example and replace it
with QRegularExpression.
Task-number: QTBUG-61129
Change-Id: I515474ee6985d36195d90dcd93876ba28a83bccc
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
- added screenshot
- some modifications to the text
Task-number QTBUG-60635
Change-Id: I57b269f93cdba696b424b5ba008d0f46ac612cda
Reviewed-by: Martin Smith <martin.smith@qt.io>
This patch updates the frozen column example to use QTextStream which
offers a more convenient way to read text files and also takes care of
converting the 8-bit data stored on disk into a 16-bit Unicode QString.
Change-Id: Ifd03903ac14b48b026d8770cda726f8ed2756ab4
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
QDesktopWidget::availableGeometry()/screenGeometry() was deprecated in
5.11 and replaced with QScreen::availableGeometry()/screenGeometry()
Change-Id: I912a133971c41196f8f49754c28ce92711ff42bb
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
QDate::longMonthName()/longDayName was deprecated in 5.10 and replaced
by QLocale::system().monthName()/dayName() in this case
Change-Id: I666cccfa1b8a437cc830804bbe3504511265ea9b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QQuaternion::conjugate() was deprecated with 5.5 and replaced by
QQuaternion::conjugated().
Change-Id: I0176e3db82e9ad793f60e1034a22b11832c8c44d
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
Qt::SvgMiterJoin is more important than the name suggests: It is used
not only by SVG but also by PDF. It differs from Qt::MiterJoin in the
miter limit behavior.
Task-number: QTBUG-52640
Change-Id: I8ad04b1231958628caab18a233d54d42ea6449e7
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Factor out the line edit displaying the code to a class and add
another instance for displaying raw string literals.
Task-number: QTBUG-60635
Change-Id: I4614e4a56e355bad5158523c58edf784868dbf4d
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Check whether an Open GL context could be created, else
fall back to raster.
Task-number: QTBUG-64797
Change-Id: I91bba41b0efca85293a1a4af054842b9f309b126
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
There was a superfluous ';' at the end of main. No compiler will
complain I guess but the examples should be syntactically correct.
Task-number: QTBUG-55128
Change-Id: I2ddc3041ed05106d04fb4f4ad74735c72c9ddb26
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Changed old signal/slot syntax to new version
Task-number: QTBUG-60635
Change-Id: I7cbe8851d321b7632a08c098b69a96cc346d5f83
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
When reading an HTML file with <H1> for example, we still set the font
size as before (that's how it always was done),
but now it remembers that it came from an H1 tag, so it writes
<h1 ...><span font-size:xx-large ...> ... rather than
<p ...><span ...> ... This will help with the upcoming Markdown
format, where heading level is saved but the font is not.
Now the style combobox in examples/widgets/richtext/textedit can set
list item type, heading type or "standard" formatting, and also shows the
current formatting of the line that has the cursor. It was always a
shortcoming in this example that it only allowed setting the current line's
block format but had no feedback to show the current format.
Change-Id: I0a7849b74f23fea84d3375c487c3a6b9f43240c1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
A \l was changed to \c to be consistent with all the other references
to the class name..
Change-Id: Ic7449a06e0a1f1d6d7087e11cc85258e81a0dfab
Reviewed-by: Martin Smith <martin.smith@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Compiling the default examples should be possible without compile errors.
Task-number: QTBUG-53141
Change-Id: I73d8787241291ae6230861a89b38e91d900fede0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
QAbstractItemModel::beginRemoveRows() must not take a negative value
for first or last. It will assert so we should make sure the examples
are correct.
The assertion was added in 00c09e752f
Change-Id: I539175c0597ed6f0ae76b7493fd3dca40638714e
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Martin Smith <martin.smith@qt.io>
QTreeView makes columns movable except for the first one
(since Qt 5.0, see commit e0fc088c0c). This is indeed best
for actual trees, but not when using QTreeView as a flat
multi-column list (with no "root decoration"). Then it should
be possible to move the first column.
[ChangeLog][QtWidgets][QHeaderView] Flat treeviews can now allow
the user to move the first column (like in Qt 4.x) using the new
method QHeaderView::setFirstSectionMovable().
Change-Id: I6b5025e40850bf5c4c373124ee81f657f3f09d29
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
It hasn't been necessary for a long time now to write the recursive
file-find function manually. It has just been an obscurely documented
feature of QDirIterator for far too long.
Demonstrate the new QLocale::formattedDataSize() function.
Also sync up the qdoc description of this example with the recent changes.
Change-Id: I9c2bb15bb5ec353d38181b160f0be198774cbea2
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
The Main Window example generates icons programmatically for its
toolbars. However, these icons are shown with low resolution in a
high-DPI display because the application is not enabling high-DPI
pixmap support.
Change-Id: Id763b707105d02f63162fff2efeb607eb5b59ed1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
- Edited gettingstartedqt.qdoc
- update .pro files
- replaced snippet statements by \quotefromfile
- removed second version of notepad.h and notepad.cpp
that were made only for quoting snippets
(\quotefromfile reads from the program code)
- show current filename in header of window
- added checking routine on filename in Save method
Task-number: QTBUG-63984
Change-Id: I5298d761763a4dfeb705a1d9b77354be853ada88
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
QFontMetrics(F)::width() has been deprecated and is replaced by
horizontalAdvance(). This updates all usage of it in tests and
documentation.
It is worth noting that many or most of the usages of
QFontMetrics::width() probably intended to use boundingRect().width(),
but since it currently works, I have not looked into that, just
replaced the function name mechanically.
Change-Id: Iec382e5bad0b50f37a6cfff841bfb46ed4d4555f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Also drops a few instances where the dependency was purely runtime,
especially for examples.
Change-Id: I2a0476f79928143596bdb3b8f01193af90574ae8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I1972da2ead51274771ff24b4c506c2b581ee6abe
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
There are plenty of other examples showing how to use QStateMachine
Task-number: QTBUG-60635
Change-Id: I82300b2a0f4e7733f08579a2aa9b548cb7d87efa
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
The vast majority is actually switched to QRandomGenerator::bounded(),
which gives a mostly uniform distribution over the [0, bound)
range. There are very few floating point cases left, as many of those
that did use floating point did not need to, after all. (I did leave
some that were too ugly for me to understand)
This commit also found a couple of calls to rand() instead of qrand().
This commit does not include changes to SSL code that continues to use
qrand() (job for someone else):
src/network/ssl/qsslkey_qt.cpp
src/network/ssl/qsslsocket_mac.cpp
tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
They are not updated after switching tabs. Thus they can be enabled even
when no entry is selected: select an entry on the current tab and then
switch to an empty tab.
Emit AddressWidget::selectionChanged() signal after changing the current tab
to update these actions.
Change-Id: I00da15ed6c3d3839210ae3ffbe1436e234695522
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Introduce nullptr and replace foreach with new C++11 range based for
loops. Minor fixups of signals, file dialog usage.
Apply the same changes to the ItemViews/puzzle example since it
shares parts of the code with DragAndDrop/puzzle. Make some
changes to both examples to that the diff of the two becomes
small for easier comparison.
Task-number: QTBUG-60635
Change-Id: I8af824229ebac24d6ec151eae92176d227695490
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Introduce Contact struct to store contact data and use it
instead of QPair<QString, QString>. Proper naming really
clarifies the code.
Task-number: QTBUG-60635
Change-Id: Ibfb421dfc854accc382212b0da46e7aafc0d528a
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
- new screenshot with more up-to-date graphical look
- deleted itemviews-editabletreemodel.png from old folder
doc/src/images
- deleted unnecessary item in qtwidgets.qdocconf
Task-number: QTBUG-60635
Change-Id: I9b82fa027347fb0fd7adb86038abd32853e68c3a
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Use the new configure system consistently.
Task-number: QTBUG-63429
Change-Id: I6668ba9fde09492f3e60e614103e18e88783d0c4
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Introduce nullptr and override. Change the ready/valid columns to
use check marks. Right-align the numerical columns. Add a shortcut
to refresh. Sort by path, making sure the root volume is first.
Task-number: QTBUG-60635
Change-Id: I74cda7647f544902aaf4d2a0ab76986f1523aa6f
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Remaining uses of Q_NULLPTR are in:
src/corelib/global/qcompilerdetection.h
(definition and documentation of Q_NULLPTR)
tests/manual/qcursor/qcursorhighdpi/main.cpp
(a test executable compilable both under Qt4 and Qt5)
Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This makes an enormous difference in responsiveness on the iPad Pro:
it actually feels like real-time drawing with hardly any lag.
Change-Id: I17c3b948e818d4ee46b4d24934c929ab9b386e69
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Add context menu providing:
"Escape Selection" Apply QRegularExpression::escape() to selection
"Paste from Code" Paste from C++
"Copy to Code" (for completeness)
Task-number: QTBUG-60635
Change-Id: Iee15c2243c7d0435b623dde4a1b26249aecd0553
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>