summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/src/widgets-and-layouts
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Remove table for listing imagesVenugopal Shivashankar2024-03-221-15/+12
| | | | | | | Task-number: QTBUG-122580 Pick-to: 6.7 6.6 Change-Id: I7ca3d677262b48ce9e1d85bd9347ad5b15d1598f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Documentation: Clarify palette/font/stylesheet inheritance/propagationAxel Spoerl2024-03-181-4/+13
| | | | | | | | | | | | | | | | Palette and font changes made by a style sheet are propagated to existing widgets and their children at change time. Palette and font changes made by setPalette() and setFont() are inherited by all existing and future children of the widget to which the call was made. Clarify this in the documentation. Fixes: QTBUG-122588 Pick-to: 6.7 6.6 6.5 6.2 5.15 Change-Id: Ic40d96fc1e5e4507f84a33138303b7193948d3fe Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Further replace 'Qt Designer' with 'Qt Widgets Designer'Kai Köhne2024-02-293-11/+11
| | | | | | | | | | Use \QD macro wherever possible. Amends 8aceccc7eb075 Task-number: QTBUG-122253 Change-Id: I276dabd40fb81486f6380fd90cf9968990932a24 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Doc: Modify unreadable tablesInkamari Harjula2023-11-281-512/+879
| | | | | | | | | | | | Added breaks in List of Stylable Widgets table. Changed List of Properties table into sections. Added list of Qt-specific properties in beg of List of Properties chapter. Moved snippet comments to different rows. Task-number: QTBUG-118446 Pick-to: 6.6 Change-Id: I494401058c7982c0a0ada18c8c94429beabba348 Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
* Doc: Revise QWidget docsAndreas Eliasson2023-11-011-3/+3
| | | | | | | | | | | | | | Reviewing and improving the docs for QWidget is part of the objectives for the 2023 Q4 OKRs. Most of the work in this patch is fixing grammatical errors and typos. It is tempting to move much, if not all, of the Detailed Description content from the QWidget class reference page (qwidget.cpp) into its own overview/explanation page, which would be more in line with the diátaxis framework. But I think that should be a different patch. Fixes: QTBUG-117758 Pick-to: 6.6 6.5 6.2 5.15 Change-Id: Ibb3f367c4677f7e6615bc0cd39d0ffe921862cb9 Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Rename accent color in QPaletteSanthosh Kumar2023-08-181-2/+2
| | | | | | | | | | Accent color role has been renamed according to name rule of other color roles in QPalette. Fixes: QTBUG-116107 Pick-to: 6.6 Change-Id: I70ac98a1e97afbdc7ea5f8d79f808c307e170712 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Move stylesheets example to manual testTor Arne Vestbø2023-06-291-17/+2
| | | | | | Pick-to: 6.5 6.6 Change-Id: If0206e63546bf948af4cfb65773e2662c53a5e79 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix qdoc link warnings after moving a few examples to manual testsTor Arne Vestbø2023-06-271-2/+2
| | | | | | Pick-to: 6.5 6.6 Change-Id: I81a6e9d52e858c3f733d4c527c70408772813b56 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Implement color role AccentColor in QStyleSheetStyle and QCssParserAxel Spoerl2023-05-221-0/+8
| | | | | | | | | | | | | | | | | The color role AccentColor has been added to QPalette. This patch implements the new color role in QCssParser and subsequently in QStyleSheetStyle. The QBrush variable names used to populate brushes, have been changed into speaking names for better code readability. tst_QCssParser has been adapted accordingly. The test function accentColor() has been added in tst_QStyleSheetStyle. Documentation has been updated. Change-Id: Ib09ddc1b61868f2bb8f70f654e83ea1c35276d30 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Replace mentions of deprecated macroTopi Reinio2023-05-151-2/+2
| | | | | | | | | Q_ENUMS() is deprecated in favor of Q_ENUM(). Pick-to: 6.5 Task-number: QTBUG-113229 Change-Id: I29cc23c87b1d6e8eeb49dd1d3ddaf4ca7d2cf8c2 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: rewrite shortcut focus sectionPaul Wicking2023-03-011-4/+9
| | | | | | | | | | As pointed out in review, somewhat contradictory advise. Rewrite the section to be more active, focus on the user and their application, and a bit more consistent. Pick-to: 6.5 Change-Id: Idbbf29d3033d32ade553290a2e89bd778876224c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Drop link to deleted pagePaul Wicking2023-01-051-3/+1
| | | | | | | | The standard accelerators page was deleted, drop the link to it. Pick-to: 6.5 6.4 Change-Id: I2fa9a94200d0e5f8895bb8c6981c73b3e9dd159e Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Style sheets: add placeholder text color property for edit widgetsEirik Aavitsland2022-09-291-1/+25
| | | | | | | | | The placeholder text was given its own QPalette color role in Qt 5.12, but there has been no way to specify it from a Qt style sheet. Fixes: QTBUG-93009 Change-Id: If58ca844c19c65b7eee14c6d5730a4ba27640c33 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Format certain operators in textPaul Wicking2022-08-231-1/+1
| | | | | | | | | | Use correct text formatting; this ensures e.g. the decrement operator isn't converted to an en dash in the docs. Apply to increment operator docs also for consistency. Task-number: QTBUG-105729 Change-Id: I5f126b90bc1d1b91d86e1f87c9b17a583841adb6 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Styles: fix typos in the docLaszlo Papp2022-07-151-4/+4
| | | | | Change-Id: I4b4ee0be40f7cef8bae41d763eaf4c1822e91c43 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-166-156/+12
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Replace deprecated QColor::fromString in tests and documentationVolker Hilsheimer2022-03-211-1/+1
| | | | | | | | Don't use deprecated methods in tests, and don't refer to them in documentation. Change-Id: I110480742d9a7b9b0a2e194e3fe610208c1e07da Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* widgets: Fix typos in documentationJonas Kvinge2021-10-122-3/+3
| | | | | | Pick-to: 5.15 6.2 Change-Id: I6b77f0ec043d08da3b7958d780dce9595daf97a6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Implement missing support for 'em' and 'ex' lengths in style sheetVolker Hilsheimer2021-08-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The Qt style sheet reference claimed that Length properties can be specified in 'em' or 'ex' units, but that was never implemented. Add the missing implementation. Since the sizes depend on the size of the font of the current element, we cannot convert the units in the CSS parser, but have to do so in the QRenderRule constructor, where we can make a decision about which font to use if the style sheet itself doesn't specify a font. Fall back to the widget font if possible; otherwise it will be the application default font. The implementation translates em into QFontMetrics.height, identical to what is already done in the QCssParser. This is in line with the CSS specification, but contradicts our previous documentation which stated that 'em' means "width of M". Fix the documentation. Fixes: QTBUG-8096 Pick-to: 6.2 Change-Id: I145e2504ae3b19101a0d0dd63653466b6c2cec1d Done-with: Cristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: fix QStyleOptionMenuItem::menuHasCheckableItems typoJeremy Katz2021-08-101-1/+1
| | | | | Change-Id: I2553f3e799e57e688ae98090e34f30122fea1142 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add note about the risk of setting min-width/height in a style sheetVolker Hilsheimer2021-05-071-2/+8
| | | | | | | Task-number: QTBUG-86677 Pick-to: 6.1 5.15 Change-Id: I1e5e10ee79d80fee40d04afe439489d6ce16a43e Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Doc: Fix broken link in stylesheet examplesNico Vertriest2020-12-231-2/+4
| | | | | | Task-number: QTBUG-89211 Change-Id: Idde01e22dd57c37c78d8c86305d047562e5c1f64 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix x-height name in stylesheet docsFlorian Bruhin2020-11-171-1/+1
| | | | | | | | | | | The *height* of an x being called "ex width" makes no sense. Also, it seems like this measurement is typically called "x-height" rather than "ex height", see e.g. https://en.wikipedia.org/wiki/X-height Pick-to: 5.15 5.12 Change-Id: Id8e2c1aa9be1a4a60e667a076486777d34f1e76d Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* macos: Rename macos style to macOSRichard Moe Gustavsen2020-09-111-1/+1
| | | | | | | | | This change shouldn't matter much to widgets, since style names there are case insensitive. But for controls style names are case sensitive, and in that case, "macOS" looks more correct. Change-Id: Ia1d442bce465692ff58fecba1cc68ecbb2e52549 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: rename 'macintosh' style to 'macos'Richard Moe Gustavsen2020-08-261-1/+1
| | | | | | | | | | | | | | Change the name/key of the style to 'macos'. Besides the name 'macintosh' being archaic, we also need this change to avoid creating 'macintosh' style folders in QtQuickControls, now that we plan to use QPlatformTheme also there to resolve the style. [ChangeLog][Widgets][QStyle] The 'macintosh' style has been renamed to 'macos'. Change-Id: I14b8a8b4dbd369e7a7d16b94e4ad27e501e7e8d0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use QList instead of QVector in qtbaseJarek Kobus2020-07-071-1/+1
| | | | | | | | Fixes all other QVector occurrences Task-number: QTBUG-84469 Change-Id: I5f9311298d341a9a3061a6a640539583d1618939 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* allow definition of SP_LineEditClearButton in cssMartin Koller2020-05-251-0/+4
| | | | | | | Added the new css property lineedit-clear-button-icon Change-Id: I4596b923eb34325a73d0a80b72d963fd6204ea26 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-03-162-7/+0
|\ | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetatype.cpp Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
| * Doc: Remove \contentspage commandsTopi Reinio2020-03-152-7/+0
| | | | | | | | | | | | | | | | The command is deprecated and has no effect apart from generating a documentation warning. Change-Id: I30871bfd6975f8268930cce99993a8579242fdb8 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devSimon Hausmann2020-01-281-0/+12
|\| | | | | | | Change-Id: Ia5727ce68001bcaab467f5fae3a4933d1217015f
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-281-0/+12
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qpnghandler.cpp Change-Id: I8630f363457bb613d8fb88470a71d95d97cdb301
| | * Doc: Update the stylesheet reference for widgets and richtextVenugopal Shivashankar2020-01-271-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the Qt-specific properites to the list. Fixes: QTBUG-37938 Change-Id: I178de6cd5e17cd282a20ccee9ce8355f540c38a1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-01-041-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h Make QVector(DataPointer dd) public to be able to properly merge 5b4b437b30b320e2cd7c9a566999a39772e5d431 from 5.15 into dev. src/widgets/kernel/qapplication.cpp tests/auto/tools/moc/allmocs_baseline_in.json Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de> Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
| * | QtWidget docs: small fixesChristian Ehrlicher2019-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply some minor fixes to the widget docs - use nullptr - use c++11 initializer list - properly delete widget when cleaning the layout (QTBUG-29471) - rework CardLayout example to make it work with Qt5 Fixes: QTBUG-29471 Change-Id: Ie2ee9f75eb8faf97d2bbd2c25e7013d4f30d8dd0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-251-1/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qhash.h src/gui/kernel/qevent.h src/widgets/kernel/qshortcut.cpp src/widgets/kernel/qshortcut.h Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
| * | QStyleSheetStyle: add new property to QPushButton: iconRichard Moe Gustavsen2019-11-141-0/+17
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is currently no proper way to change the icon of a pushbutton from css. But there is a need for doing so (QTBUG-2982), and the typical work-around is to instead use the css property 'qproperty-icon'. But setting qproperties from the style is not a good idea in the first place, since it modifies the state of the widget it draws. Moreover, such properties are only set once (in QStyle::polish()), and will not have any effect on pseudo states, like hover. To close this gap, this patch will add a css property 'icon' that can be set on a QPushButton. This property will follow normal css cascading, and respect pseudo states, equal to any other css property. [ChangeLog][QtWidgets][QStyle] You can now set the CSS property 'icon' on a QPushButton to override which icon to draw. Fixes: QTBUG-79137 Change-Id: Ie7e0b0fa4f19471f51108cd4ca931356219d562e Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-061-1/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/features/mac/default_post.prf src/corelib/tools/qsimd_p.h src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm util/qfloat16-tables/gen_qfloat16_tables.cpp Change-Id: If48fa8a3bc3c983706b609a6d3822cb67c1352a4
| | * Doc: Add notes about Qt Style Sheets taking precedenceLeena Miettinen2019-10-311-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | ...over setting properties on individual widgets. Task-number: QTBUG-28675 Change-Id: Ic7bfd723ed8970112a9892727170d3bacaa1903f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-261-0/+4
|\| | | | | | | | | | | Change-Id: I379794a01cbf6fb39d94b24cc8c90b1971a212b9
| * | docs: clarify usage of css 'qproperty' in stylesheetsRichard Moe Gustavsen2019-10-211-0/+4
| |/ | | | | | | | | | | | | | | | | Clarify that the qproperty properties will only be evaluated once. Fixes: QTBUG-2982 Change-Id: Ie294ced118f740c7378c62c0b5a4924d5628e118 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* / Remove deprecated PE_IndicatorViewItemCheck and PE_FrameStatusBarVolker Hilsheimer2019-10-091-1/+1
|/ | | | | | | | They have been marked as deprecated since 5.13, and can be removed from Qt 6 codebase, which silences the respective compiler warnings. Change-Id: I3443c7bfa8db148b0b48957e2adc5eb131197faf Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* [Doc] Fix minor typosSze Howe Koh2019-07-101-1/+1
| | | | | Change-Id: I7e74806218dcc07d800f4ec08e94abce32483f5e Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-041-1/+1
|\ | | | | | | Change-Id: Ia7328524f2cd9d5995ac8705f0fe0bf570b2e831
| * Doc: Use the \nullptr macro instead of 0Venugopal Shivashankar2019-04-021-1/+1
| | | | | | | | | | | | | | | | This enables overriding the macro so that it translates to 'None' in the Qt for Python context. Change-Id: Ib3cecf57eeb0405a1929309b71e9f012a07f11cf Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-10-251-1/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/animation/qpropertyanimation.cpp src/gui/image/qicon.cpp tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp Change-Id: I3698172b7b44ebb487cb38f50fd2c4a9f8a35b21
| * Fix typo vice versaCristian Maureira-Fredes2018-10-151-1/+1
| | | | | | | | | | Change-Id: I639d6f9d2019998d91b52506afa2cbd861a0dbe4 Reviewed-by: Gabriel de Dietrich (DO NOT ADD TO REVIEWS) <gabriel.dedietrich@gmail.com>
* | Qt Style Sheets: add support for hsl(a) colorsChristian Ehrlicher2018-10-181-6/+12
|/ | | | | | | | | | | | | | The Qt stylesheets color property did not support hsl or hsla although CSS 2.1 does support it. Since QColor natively supports this color model only the color parsing needed to be adjusted. This also adds some stricter checks for a valid css color definition and prints a warning about the issue. [ChangeLog][QtGui][CSS] Added support for hsl/hsla colors Fixes: QTBUG-58804 Change-Id: Ief65a36a7e0ed0d705dc1fe5a8658e8d07fe9a13 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Make reference to platform styles version agnosticPaul Wicking2018-07-251-4/+3
| | | | | | | | Remove platform/version specific reference to avoid outdated docs. Task-number: QTBUG-64304 Change-Id: Ief9d5db95fa1f865fd826a6426b1621e81bdb6ce Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Doc: correct filename png filesNico Vertriest2017-10-181-1/+1
| | | | | | | | qpushbutton.h:55: warning: Missing image: windows-pushbutton.jpg widgets.qdoc:28: warning: Missing image: windowsvista-treeview.png Change-Id: I2ebf2aa809f8d532f597624f6ed2f9d636e860a6 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-061-10/+9
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839