diff options
Diffstat (limited to 'src/widgets')
32 files changed, 87 insertions, 975 deletions
diff --git a/src/widgets/dialogs/dialogs.pri b/src/widgets/dialogs/dialogs.pri index 8614d2bcc6..c9438696fa 100644 --- a/src/widgets/dialogs/dialogs.pri +++ b/src/widgets/dialogs/dialogs.pri @@ -22,8 +22,7 @@ win32 { SOURCES += dialogs/qwizard_win.cpp } -wince: FORMS += dialogs/qfiledialog_embedded.ui -else: FORMS += dialogs/qfiledialog.ui +FORMS += dialogs/qfiledialog.ui INCLUDEPATH += $$PWD SOURCES += \ diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index 8e74c659fa..60e1c43721 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -1049,7 +1049,7 @@ QSize QDialog::minimumSizeHint() const \brief whether show() should pop up the dialog as modal or modeless By default, this property is \c false and show() pops up the dialog - as modeless. Setting his property to true is equivalent to setting + as modeless. Setting this property to true is equivalent to setting QWidget::windowModality to Qt::ApplicationModal. exec() ignores the value of this property and always pops up the diff --git a/src/widgets/dialogs/qfiledialog_embedded.ui b/src/widgets/dialogs/qfiledialog_embedded.ui deleted file mode 100644 index 933acdeaf2..0000000000 --- a/src/widgets/dialogs/qfiledialog_embedded.ui +++ /dev/null @@ -1,353 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <comment>********************************************************************* -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the QtWidgets module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** 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 Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** included in the packaging of this file. Please review the following -** information to ensure the GNU General Public License requirements will -** be met: https://www.gnu.org/licenses/gpl-2.0.html and -** https://www.gnu.org/licenses/gpl-3.0.html. -** -** $QT_END_LICENSE$ -** -*********************************************************************</comment> - <class>QFileDialog</class> - <widget class="QDialog" name="QFileDialog"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>240</width> - <height>320</height> - </rect> - </property> - <property name="sizeGripEnabled"> - <bool>true</bool> - </property> - <layout class="QVBoxLayout"> - <item> - <widget class="QFileDialogComboBox" name="lookInCombo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>1</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item> - <layout class="QHBoxLayout"> - <item> - <widget class="QToolButton" name="backButton"> - <property name="toolTip"> - <string>Back</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="forwardButton"> - <property name="toolTip"> - <string>Forward</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="toParentButton"> - <property name="toolTip"> - <string>Parent Directory</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="newFolderButton"> - <property name="toolTip"> - <string>Create New Folder</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="listModeButton"> - <property name="toolTip"> - <string>List View</string> - </property> - </widget> - </item> - <item> - <widget class="QToolButton" name="detailModeButton"> - <property name="toolTip"> - <string>Detail View</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QSplitter" name="splitter"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="childrenCollapsible"> - <bool>false</bool> - </property> - <widget class="QSidebar" name="sidebar"/> - <widget class="QFrame" name="frame"> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QVBoxLayout"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QStackedWidget" name="stackedWidget"> - <property name="currentIndex"> - <number>0</number> - </property> - <widget class="QWidget" name="page"> - <layout class="QVBoxLayout"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QFileDialogListView" name="listView"/> - </item> - </layout> - </widget> - <widget class="QWidget" name="page_2"> - <layout class="QVBoxLayout"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QFileDialogTreeView" name="treeView"/> - </item> - </layout> - </widget> - </widget> - </item> - </layout> - </widget> - </widget> - </item> - <item> - <layout class="QGridLayout"> - <item row="0" column="0"> - <widget class="QFileDialogLineEdit" name="fileNameEdit"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>1</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - <item row="0" column="1" rowspan="2"> - <widget class="QDialogButtonBox" name="buttonBox"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="standardButtons"> - <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QComboBox" name="fileTypeCombo"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="fileNameLabel"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="fileTypeLabel"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="text"> - <string>Files of type:</string> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="lookInLabel"> - <property name="enabled"> - <bool>false</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="maximumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="text"> - <string>Look in:</string> - </property> - </widget> - </item> - </layout> - </widget> - <customwidgets> - <customwidget> - <class>QFileDialogTreeView</class> - <extends>QTreeView</extends> - <header>private/qfiledialog_p.h</header> - </customwidget> - <customwidget> - <class>QFileDialogListView</class> - <extends>QListView</extends> - <header>private/qfiledialog_p.h</header> - </customwidget> - <customwidget> - <class>QSidebar</class> - <extends>QListWidget</extends> - <header>private/qsidebar_p.h</header> - </customwidget> - <customwidget> - <class>QFileDialogLineEdit</class> - <extends>QLineEdit</extends> - <header>private/qfiledialog_p.h</header> - </customwidget> - <customwidget> - <class>QFileDialogComboBox</class> - <extends>QComboBox</extends> - <header>private/qfiledialog_p.h</header> - </customwidget> - </customwidgets> - <tabstops> - <tabstop>lookInCombo</tabstop> - <tabstop>backButton</tabstop> - <tabstop>forwardButton</tabstop> - <tabstop>toParentButton</tabstop> - <tabstop>newFolderButton</tabstop> - <tabstop>listModeButton</tabstop> - <tabstop>detailModeButton</tabstop> - <tabstop>sidebar</tabstop> - <tabstop>listView</tabstop> - <tabstop>fileNameEdit</tabstop> - <tabstop>fileTypeCombo</tabstop> - <tabstop>buttonBox</tabstop> - <tabstop>treeView</tabstop> - </tabstops> - <resources/> - <connections/> -</ui> diff --git a/src/widgets/doc/images/fusion-style.png b/src/widgets/doc/images/fusion-style.png Binary files differnew file mode 100644 index 0000000000..753bb2806a --- /dev/null +++ b/src/widgets/doc/images/fusion-style.png diff --git a/src/widgets/doc/images/macos-lineedit.png b/src/widgets/doc/images/macos-lineedit.png Binary files differnew file mode 100644 index 0000000000..765f30ab2f --- /dev/null +++ b/src/widgets/doc/images/macos-lineedit.png diff --git a/src/widgets/doc/images/macos-progressbar.png b/src/widgets/doc/images/macos-progressbar.png Binary files differnew file mode 100644 index 0000000000..79be5f559c --- /dev/null +++ b/src/widgets/doc/images/macos-progressbar.png diff --git a/src/widgets/doc/images/macos-style.png b/src/widgets/doc/images/macos-style.png Binary files differnew file mode 100644 index 0000000000..818e634632 --- /dev/null +++ b/src/widgets/doc/images/macos-style.png diff --git a/src/widgets/doc/images/macos-style2.png b/src/widgets/doc/images/macos-style2.png Binary files differnew file mode 100644 index 0000000000..728b407428 --- /dev/null +++ b/src/widgets/doc/images/macos-style2.png diff --git a/src/widgets/doc/images/macos-tabwidget.png b/src/widgets/doc/images/macos-tabwidget.png Binary files differnew file mode 100644 index 0000000000..d189dbae3c --- /dev/null +++ b/src/widgets/doc/images/macos-tabwidget.png diff --git a/src/widgets/doc/images/windows-style.png b/src/widgets/doc/images/windows-style.png Binary files differnew file mode 100644 index 0000000000..f11a4510c3 --- /dev/null +++ b/src/widgets/doc/images/windows-style.png diff --git a/src/widgets/doc/images/windows-style2.png b/src/widgets/doc/images/windows-style2.png Binary files differnew file mode 100644 index 0000000000..168963cfde --- /dev/null +++ b/src/widgets/doc/images/windows-style2.png diff --git a/src/widgets/doc/images/windows-vista-style.png b/src/widgets/doc/images/windows-vista-style.png Binary files differnew file mode 100644 index 0000000000..f28270007f --- /dev/null +++ b/src/widgets/doc/images/windows-vista-style.png diff --git a/src/widgets/doc/images/windows-xp-style.png b/src/widgets/doc/images/windows-xp-style.png Binary files differnew file mode 100644 index 0000000000..7b323dd69b --- /dev/null +++ b/src/widgets/doc/images/windows-xp-style.png diff --git a/src/widgets/doc/src/qtwidgets-index.qdoc b/src/widgets/doc/src/qtwidgets-index.qdoc index 55661f342b..6253ae8d7d 100644 --- a/src/widgets/doc/src/qtwidgets-index.qdoc +++ b/src/widgets/doc/src/qtwidgets-index.qdoc @@ -85,7 +85,7 @@ interfaces \row \li \image windowsvista-tabwidget.png \li \image fusion-tabwidget.png - \li \image macintosh-tabwidget.png + \li \image macos-tabwidget.png \endtable \l{Qt Style Sheets} are a powerful mechanism that allows you to customize the diff --git a/src/widgets/doc/src/widgets-and-layouts/gallery-fusion.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-fusion.qdoc deleted file mode 100644 index ca6de8fd5e..0000000000 --- a/src/widgets/doc/src/widgets-and-layouts/gallery-fusion.qdoc +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 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$ -** -****************************************************************************/ - -/*! - \page gallery-fusion.html - - \title Fusion Style Widget Gallery - \ingroup gallery - - This page shows some of the widgets available in Qt - when configured to use the "fusion" style. - -\section2 Buttons - -\table 100% -\row -\li \image fusion-pushbutton.png - \caption The QPushButton widget provides a command button. -\li \image fusion-toolbutton.png - \caption The QToolButton class provides a quick-access button to commands - or options, usually used inside a QToolBar. -\endtable - -\table 100% -\row -\li \image fusion-checkbox.png - \caption The QCheckBox widget provides a checkbox with a text label. -\li \image fusion-radiobutton.png - \caption The QRadioButton widget provides a radio button with a text or pixmap label. -\endtable - -\section2 Containers - -\table 100% -\row -\li \image fusion-groupbox.png - The QGroupBox widget provides a group box frame with a title. -\li \image fusion-tabwidget.png - The QTabWidget class provides a stack of tabbed widgets. -\li \image fusion-frame.png - The QFrame widget provides a simple decorated container for other widgets. -\li \image fusion-toolbox.png - The QToolBox class provides a column of tabbed widget items. -\endtable - -\section2 Item Views - -\table 100% -\row -\li \image fusion-listview.png - The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view. -\li \image fusion-treeview.png - The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view. -\li \image fusion-tableview.png - The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\li -\li -\endtable - -\section2 Display Widgets - -\table 100% -\row -\li \image fusion-progressbar.png - The QProgressBar widget provides a horizontal progress bar. -\li \image fusion-label.png - The QLabel widget provides a text or image display. -\li \image fusion-lcdnumber.png - The QLCDNumber widget displays a number with LCD-like digits. -\endtable - -\section2 Input Widgets - -\table 100% -\row -\li \image fusion-lineedit.png - The QLineEdit widget is a one-line text editor. -\li \image fusion-dateedit.png - The QDateEdit class provides a widget for editing dates. -\li \image fusion-timeedit.png - The QTimeEdit class provides a widget for editing times. -\li \image fusion-datetimeedit.png - The QDateTimeEdit class provides a widget for editing dates and times. -\endtable - -\table 100% -\row -\li \image fusion-slider.png - The QSlider widget provides a vertical or horizontal slider. -\li \image fusion-combobox.png - The QComboBox widget is a combined button and pop-up list. -\li \image fusion-spinbox.png - The QSpinBox class provides a spin box widget. -\endtable - -\table 100% -\row -\li \image fusion-fontcombobox.png - The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts. -\li \image fusion-doublespinbox.png - The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered. -\li \image fusion-horizontalscrollbar.png - The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation. -\endtable - -\table 100% -\row -\li \image fusion-dial.png - The QDial class provides a rounded range control (like a speedometer or potentiometer). -\li \image fusion-textedit.png - The QTextEdit class provides a widget that is used to edit and display both plain and rich text. -\li \image fusion-calendarwidget.png - The QCalendarWidget class provides a monthly calendar widget that can be used to select dates. -\endtable -*/ diff --git a/src/widgets/doc/src/widgets-and-layouts/gallery-macintosh.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-macintosh.qdoc deleted file mode 100644 index 4d4e2b9a8d..0000000000 --- a/src/widgets/doc/src/widgets-and-layouts/gallery-macintosh.qdoc +++ /dev/null @@ -1,142 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 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$ -** -****************************************************************************/ - -/*! - \page gallery-macintosh.html - - \title Macintosh Style Widget Gallery - \ingroup gallery - - This page shows some of the widgets available in Qt - when configured to use the "macintosh" style. This - style is only available on Mac OSX, and provides - native look'n'feel by integrating to the Mac OSX - platform theme. Thus, the final appearance varies - depending on the active Mac OSX theme. - -\section2 Buttons - -\table 100% -\row -\li \image macintosh-pushbutton.png - \caption The QPushButton widget provides a command button. -\li \image macintosh-toolbutton.png - \caption The QToolButton class provides a quick-access button to commands - or options, usually used inside a QToolBar. -\endtable - -\table 100% -\row -\li \image macintosh-checkbox.png - \caption The QCheckBox widget provides a checkbox with a text label. -\li \image macintosh-radiobutton.png - \caption The QRadioButton widget provides a radio button with a text or pixmap label. -\endtable - -\section2 Containers - -\table 100% -\row -\li \image macintosh-groupbox.png - The QGroupBox widget provides a group box frame with a title. -\li \image macintosh-tabwidget.png - The QTabWidget class provides a stack of tabbed widgets. -\li \image macintosh-frame.png - The QFrame widget provides a simple decorated container for other widgets. -\li \image macintosh-toolbox.png - The QToolBox class provides a column of tabbed widget items. -\endtable - -\section2 Item Views - -\table 100% -\row -\li \image macintosh-listview.png - The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view. -\li \image macintosh-treeview.png - The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view. -\li \image macintosh-tableview.png - The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\li -\li -\endtable - -\section2 Display Widgets - -\table 100% -\row -\li \image macintosh-progressbar.png - The QProgressBar widget provides a horizontal progress bar. -\li \image macintosh-label.png - The QLabel widget provides a text or image display. -\li \image macintosh-lcdnumber.png - The QLCDNumber widget displays a number with LCD-like digits. -\endtable - -\section2 Input Widgets - -\table 100% -\row -\li \image macintosh-lineedit.png - The QLineEdit widget is a one-line text editor. -\li \image macintosh-dateedit.png - The QDateEdit class provides a widget for editing dates. -\li \image macintosh-timeedit.png - The QTimeEdit class provides a widget for editing times. -\li \image macintosh-datetimeedit.png - The QDateTimeEdit class provides a widget for editing dates and times. -\endtable - -\table 100% -\row -\li \image macintosh-slider.png - The QSlider widget provides a vertical or horizontal slider. -\li \image macintosh-combobox.png - The QComboBox widget is a combined button and pop-up list. -\li \image macintosh-spinbox.png - The QSpinBox class provides a spin box widget. -\endtable - -\table 100% -\row -\li \image macintosh-fontcombobox.png - The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts. -\li \image macintosh-doublespinbox.png - The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered. -\li \image macintosh-horizontalscrollbar.png - The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation. -\endtable - -\table 100% -\row -\li \image macintosh-dial.png - The QDial class provides a rounded range control (like a speedometer or potentiometer). -\li \image macintosh-textedit.png - The QTextEdit class provides a widget that is used to edit and display both plain and rich text. -\li \image macintosh-calendarwidget.png - The QCalendarWidget class provides a monthly calendar widget that can be used to select dates. -\endtable -*/ diff --git a/src/widgets/doc/src/widgets-and-layouts/gallery-windows.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-windows.qdoc deleted file mode 100644 index 40e41ff98a..0000000000 --- a/src/widgets/doc/src/widgets-and-layouts/gallery-windows.qdoc +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 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$ -** -****************************************************************************/ - -/*! - \page gallery-windows.html - - \title Windows Style Widget Gallery - \ingroup gallery - - This page shows some of the widgets available in Qt - when configured to use the "windows" style. - -\section2 Buttons - -\table 100% -\row -\li \image windows-pushbutton.png - \caption The QPushButton widget provides a command button. -\li \image windows-toolbutton.png - \caption The QToolButton class provides a quick-access button to commands - or options, usually used inside a QToolBar. -\endtable - -\table 100% -\row -\li \image windows-checkbox.png - \caption The QCheckBox widget provides a checkbox with a text label. -\li \image windows-radiobutton.png - \caption The QRadioButton widget provides a radio button with a text or pixmap label. -\endtable - -\section2 Containers - -\table 100% -\row -\li \image windows-groupbox.png - The QGroupBox widget provides a group box frame with a title. -\li \image windows-tabwidget.png - The QTabWidget class provides a stack of tabbed widgets. -\li \image windows-frame.png - The QFrame widget provides a simple decorated container for other widgets. -\li \image windows-toolbox.png - The QToolBox class provides a column of tabbed widget items. -\endtable - -\section2 Item Views - -\table 100% -\row -\li \image windows-listview.png - The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view. -\li \image windows-treeview.png - The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view. -\li \image windows-tableview.png - The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\li -\li -\endtable - -\section2 Display Widgets - -\table 100% -\row -\li \image windows-progressbar.png - The QProgressBar widget provides a horizontal progress bar. -\li \image windows-label.png - The QLabel widget provides a text or image display. -\li \image windows-lcdnumber.png - The QLCDNumber widget displays a number with LCD-like digits. -\endtable - -\section2 Input Widgets - -\table 100% -\row -\li \image windows-lineedit.png - The QLineEdit widget is a one-line text editor. -\li \image windows-dateedit.png - The QDateEdit class provides a widget for editing dates. -\li \image windows-timeedit.png - The QTimeEdit class provides a widget for editing times. -\li \image windows-datetimeedit.png - The QDateTimeEdit class provides a widget for editing dates and times. -\endtable - -\table 100% -\row -\li \image windows-slider.png - The QSlider widget provides a vertical or horizontal slider. -\li \image windows-combobox.png - The QComboBox widget is a combined button and pop-up list. -\li \image windows-spinbox.png - The QSpinBox class provides a spin box widget. -\endtable - -\table 100% -\row -\li \image windows-fontcombobox.png - The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts. -\li \image windows-doublespinbox.png - The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered. -\li \image windows-horizontalscrollbar.png - The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation. -\endtable - -\table 100% -\row -\li \image windows-dial.png - The QDial class provides a rounded range control (like a speedometer or potentiometer). -\li \image windows-textedit.png - The QTextEdit class provides a widget that is used to edit and display both plain and rich text. -\li \image windows-calendarwidget.png - The QCalendarWidget class provides a monthly calendar widget that can be used to select dates. -\endtable -*/ diff --git a/src/widgets/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc deleted file mode 100644 index 2347528a3c..0000000000 --- a/src/widgets/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc +++ /dev/null @@ -1,142 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 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$ -** -****************************************************************************/ - -/*! - \page gallery-windowsvista.html - - \title Windows Vista Style Widget Gallery - \ingroup gallery - - This page shows some of the widgets available in Qt - when configured to use the "windowsvista" style. This - style is only available on Windows Vista or later. - This style provides native look'n'feel by integrating - to the Windows platform theme. Thus, the final appearance - varies depending on the active Windows theme. - -\section2 Buttons - -\table 100% -\row -\li \image windowsvista-pushbutton.png - \caption The QPushButton widget provides a command button. -\li \image windowsvista-toolbutton.png - \caption The QToolButton class provides a quick-access button to commands - or options, usually used inside a QToolBar. -\endtable - -\table 100% -\row -\li \image windowsvista-checkbox.png - \caption The QCheckBox widget provides a checkbox with a text label. -\li \image windowsvista-radiobutton.png - \caption The QRadioButton widget provides a radio button with a text or pixmap label. -\endtable - -\section2 Containers - -\table 100% -\row -\li \image windowsvista-groupbox.png - The QGroupBox widget provides a group box frame with a title. -\li \image windowsvista-tabwidget.png - The QTabWidget class provides a stack of tabbed widgets. -\li \image windowsvista-frame.png - The QFrame widget provides a simple decorated container for other widgets. -\li \image windowsvista-toolbox.png - The QToolBox class provides a column of tabbed widget items. -\endtable - -\section2 Item Views - -\table 100% -\row -\li \image windowsvista-listview.png - The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view. -\li \image windowsvista-treeview.png - The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view. -\li \image windowsvista-tableview.png - The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\li -\li -\endtable - -\section2 Display Widgets - -\table 100% -\row -\li \image windowsvista-progressbar.png - The QProgressBar widget provides a horizontal progress bar. -\li \image windowsvista-label.png - The QLabel widget provides a text or image display. -\li \image windowsvista-lcdnumber.png - The QLCDNumber widget displays a number with LCD-like digits. -\endtable - -\section2 Input Widgets - -\table 100% -\row -\li \image windowsvista-lineedit.png - The QLineEdit widget is a one-line text editor. -\li \image windowsvista-dateedit.png - The QDateEdit class provides a widget for editing dates. -\li \image windowsvista-timeedit.png - The QTimeEdit class provides a widget for editing times. -\li \image windowsvista-datetimeedit.png - The QDateTimeEdit class provides a widget for editing dates and times. -\endtable - -\table 100% -\row -\li \image windowsvista-slider.png - The QSlider widget provides a vertical or horizontal slider. -\li \image windowsvista-combobox.png - The QComboBox widget is a combined button and pop-up list. -\li \image windowsvista-spinbox.png - The QSpinBox class provides a spin box widget. -\endtable - -\table 100% -\row -\li \image windowsvista-fontcombobox.png - The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts. -\li \image windowsvista-doublespinbox.png - The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered. -\li \image windowsvista-horizontalscrollbar.png - The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation. -\endtable - -\table 100% -\row -\li \image windowsvista-dial.png - The QDial class provides a rounded range control (like a speedometer or potentiometer). -\li \image windowsvista-textedit.png - The QTextEdit class provides a widget that is used to edit and display both plain and rich text. -\li \image windowsvista-calendarwidget.png - The QCalendarWidget class provides a monthly calendar widget that can be used to select dates. -\endtable -*/ diff --git a/src/widgets/doc/src/widgets-and-layouts/gallery.qdoc b/src/widgets/doc/src/widgets-and-layouts/gallery.qdoc index f8b6584f19..a82462a432 100644 --- a/src/widgets/doc/src/widgets-and-layouts/gallery.qdoc +++ b/src/widgets/doc/src/widgets-and-layouts/gallery.qdoc @@ -26,33 +26,67 @@ ****************************************************************************/ /*! - \group gallery + \page gallery.html \title Qt Widget Gallery \brief Qt widgets shown in different styles on various platforms. Qt's support for widget styles and themes enables your application to fit in - with the native desktop environment. Below, you can find links to the various - widget styles that are supplied with Qt. + with the native desktop environment. - \table - \row - \li \image windows-tabwidget.png Windows Style Widget Gallery - \caption \l{Windows Style Widget Gallery} + The widgets examples show how some of the widgets available in Qt might + appear when configured to use the a particular style. Each style is only + available on the respective platfom, and provides native look and feel by + integrating to the platform theme. Thus, the final appearance varies + depending on the active theme. - The Windows style is provided by QWindowsStyle. - \li \image windowsvista-tabwidget.png Windows Vista Style Widget Gallery - \caption \l{Windows Vista Style Widget Gallery} + \table + \row + \li The Windows style ("windows") is provided by QWindowsStyle. + \li \image windows-style.png Windows Style + \row + \li \image windows-vista-style.png Windows Vista Style + \li The Windows Vista style ("windowsvista") is provided by + QWindowsVistaStyle. + \row + \li The \macos style ("macintosh") is provided by QMacStyle. + \li \image macos-style.png \macos Style + \row + \li \image fusion-style.png Fusion Style + \li The Fusion style ("fusion") is provided by QFusionStyle. + \endtable - The Windows Vista style is provided by QWindowsVistaStyle. + The Styles example displays the following widgets: - \row - \li \image macintosh-tabwidget.png Macintosh Style Widget Gallery - \caption \l{Macintosh Style Widget Gallery} + \list + \li QCheckBox (1) provides a checkbox with a text label. + \li QRadioButton (2) provides a radio button with a text or pixmap + label. + \li QPushButton (3) provides a command button. + \li QTabWidget (4) provides a stack of tabbed widgets. + \li QTableWidget (5) provides a classic item-based table view. + \li QScrollBar (6) provides a vertical or horizontal scroll bar. + \li QProgressBar (7) provides a horizontal progress bar. + \li QDateTimeEdit (8) provides a widget for editing dates and times. + \li QSlider (9) provides a vertical or horizontal slider. + \li QDial (10) provides a rounded range control (like a speedometer + or potentiometer). + \endlist - The Macintosh style is provided by QMacStyle. - \li \image fusion-tabwidget.png Fusion Style Widget Gallery - \caption \l{Fusion Style Widget Gallery} + The Calendar Widget example displays some additional widgets, here run on + Windows 10 and \macos: - The Fusion style is provided by QFusionStyle. - \endtable + \image windows-style2.png + \caption Calendar Widget example on Windows 10 + + \image macos-style2.png + \caption Calendar Widget example on \macos + + \list + \li QGroupBox (1) provides a group box frame with a title. + \li QCalendarWidget (2) provides a monthly calendar widget + that can be used to select dates. + \li QLabel (3) provides a text or image display. + \li QDateEdit (4) provides a widget for editing dates. + \li QComboBox (5) provides a combined button and pop-up list. + \endlist */ diff --git a/src/widgets/doc/src/widgets-and-layouts/widgets.qdoc b/src/widgets/doc/src/widgets-and-layouts/widgets.qdoc index 15af308cec..700a4479fd 100644 --- a/src/widgets/doc/src/widgets-and-layouts/widgets.qdoc +++ b/src/widgets/doc/src/widgets-and-layouts/widgets.qdoc @@ -45,21 +45,15 @@ \row \li \image fusion-label.png \li \image windowsvista-pushbutton.png - \li \image macintosh-progressbar.png + \li \image macos-progressbar.png \row \li \image fusion-combobox.png \li \image windowsvista-radiobutton.png - \li \image macintosh-lineedit.png + \li \image macos-lineedit.png \endtable \annotatedlist basicwidgets - \table - \row - \li \image windowsvista-tabwidget.png - \li \image macintosh-groupbox.png - \endtable - \section2 Advanced Widget Classes diff --git a/src/widgets/itemviews/itemviews.pri b/src/widgets/itemviews/itemviews.pri index d78bc4b40e..ed0e3fe072 100644 --- a/src/widgets/itemviews/itemviews.pri +++ b/src/widgets/itemviews/itemviews.pri @@ -28,9 +28,6 @@ HEADERS += \ itemviews/qitemeditorfactory_p.h \ itemviews/qtreewidgetitemiterator.h \ itemviews/qdatawidgetmapper.h \ - itemviews/qcolumnviewgrip_p.h \ - itemviews/qcolumnview.h \ - itemviews/qcolumnview_p.h \ itemviews/qstyleditemdelegate.h SOURCES += \ @@ -49,11 +46,20 @@ SOURCES += \ itemviews/qitemeditorfactory.cpp \ itemviews/qtreewidgetitemiterator.cpp \ itemviews/qdatawidgetmapper.cpp \ - itemviews/qcolumnview.cpp \ - itemviews/qcolumnviewgrip.cpp \ itemviews/qstyleditemdelegate.cpp } +qtConfig(columnview) { + HEADERS += \ + itemviews/qcolumnviewgrip_p.h \ + itemviews/qcolumnview.h \ + itemviews/qcolumnview_p.h + + SOURCES += \ + itemviews/qcolumnview.cpp \ + itemviews/qcolumnviewgrip.cpp +} + HEADERS += \ itemviews/qfileiconprovider.h \ itemviews/qfileiconprovider_p.h \ diff --git a/src/widgets/itemviews/qcolumnview.h b/src/widgets/itemviews/qcolumnview.h index 7d5e2f5cd1..42eac7426a 100644 --- a/src/widgets/itemviews/qcolumnview.h +++ b/src/widgets/itemviews/qcolumnview.h @@ -43,10 +43,9 @@ #include <QtWidgets/qtwidgetsglobal.h> #include <QtWidgets/qabstractitemview.h> -QT_BEGIN_NAMESPACE - +QT_REQUIRE_CONFIG(columnview); -#ifndef QT_NO_COLUMNVIEW +QT_BEGIN_NAMESPACE class QColumnViewPrivate; @@ -109,8 +108,6 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_clicked(const QModelIndex &)) }; -#endif // QT_NO_COLUMNVIEW - QT_END_NAMESPACE #endif // QCOLUMNVIEW_H diff --git a/src/widgets/itemviews/qcolumnview_p.h b/src/widgets/itemviews/qcolumnview_p.h index 7eff0f66cd..fa276075fe 100644 --- a/src/widgets/itemviews/qcolumnview_p.h +++ b/src/widgets/itemviews/qcolumnview_p.h @@ -54,8 +54,6 @@ #include <QtWidgets/private/qtwidgetsglobal_p.h> #include "qcolumnview.h" -#ifndef QT_NO_QCOLUMNVIEW - #include <private/qabstractitemview_p.h> #include <QtCore/qabstractitemmodel.h> @@ -67,6 +65,8 @@ #include <qevent.h> #include <qscrollbar.h> +QT_REQUIRE_CONFIG(columnview); + QT_BEGIN_NAMESPACE class QColumnViewPreviewColumn : public QAbstractItemView { @@ -190,9 +190,7 @@ public: const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE; }; -#endif // QT_NO_QCOLUMNVIEW - QT_END_NAMESPACE -#endif //QCOLUMNVIEW_P_H +#endif //QCOLUMNVIEW_P_H diff --git a/src/widgets/itemviews/qcolumnviewgrip.cpp b/src/widgets/itemviews/qcolumnviewgrip.cpp index f7d6e6d2b0..4a4237805f 100644 --- a/src/widgets/itemviews/qcolumnviewgrip.cpp +++ b/src/widgets/itemviews/qcolumnviewgrip.cpp @@ -37,8 +37,6 @@ ** ****************************************************************************/ -#ifndef QT_NO_QCOLUMNVIEW - #include "qcolumnviewgrip_p.h" #include <qstyleoption.h> #include <qpainter.h> @@ -190,5 +188,3 @@ originalXLocation(-1) QT_END_NAMESPACE #include "moc_qcolumnviewgrip_p.cpp" - -#endif // QT_NO_QCOLUMNVIEW diff --git a/src/widgets/itemviews/qcolumnviewgrip_p.h b/src/widgets/itemviews/qcolumnviewgrip_p.h index 3447f9f824..16c0aefada 100644 --- a/src/widgets/itemviews/qcolumnviewgrip_p.h +++ b/src/widgets/itemviews/qcolumnviewgrip_p.h @@ -54,7 +54,7 @@ #include <QtWidgets/private/qtwidgetsglobal_p.h> #include <private/qwidget_p.h> -#ifndef QT_NO_QCOLUMNVIEW +QT_REQUIRE_CONFIG(columnview); QT_BEGIN_NAMESPACE @@ -98,6 +98,4 @@ public: QT_END_NAMESPACE -#endif // QT_NO_QCOLUMNVIEW - #endif //QCOLUMNVIEWGRIP_P_H diff --git a/src/widgets/kernel/qformlayout.cpp b/src/widgets/kernel/qformlayout.cpp index c66a6d5673..868ac17b6f 100644 --- a/src/widgets/kernel/qformlayout.cpp +++ b/src/widgets/kernel/qformlayout.cpp @@ -1907,7 +1907,7 @@ void QFormLayout::getItemPosition(int index, int *rowPtr, ItemRole *rolePtr) con if (rowPtr) *rowPtr = row; - if (rolePtr && col != -1) { + if (rolePtr && row != -1) { const bool spanning = col == 1 && d->m_matrix(row, col)->fullRow; if (spanning) { *rolePtr = SpanningRole; diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 370ae2aed1..b465ac36c7 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -5611,13 +5611,15 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP // punch a hole in the backingstore, so the texture will be visible. if (!q->testAttribute(Qt::WA_AlwaysStackOnTop)) { beginBackingStorePainting(); - QPainter p(q); if (backingStore) { + QPainter p(q); p.setCompositionMode(QPainter::CompositionMode_Source); p.fillRect(q->rect(), Qt::transparent); } else { + QImage img = grabFramebuffer(); + QPainter p(q); // We are not drawing to a backingstore: fall back to QImage - p.drawImage(q->rect(), grabFramebuffer()); + p.drawImage(q->rect(), img); skipPaintEvent = true; } endBackingStorePainting(); diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp index 0c1cf0ec6e..7c6466f5da 100644 --- a/src/widgets/styles/qcommonstyle.cpp +++ b/src/widgets/styles/qcommonstyle.cpp @@ -608,7 +608,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q } break; #endif // QT_NO_LINEEDIT -#ifndef QT_NO_COLUMNVIEW +#if QT_CONFIG(columnview) case PE_IndicatorColumnViewArrow: { if (const QStyleOptionViewItem *viewOpt = qstyleoption_cast<const QStyleOptionViewItem *>(opt)) { bool reverse = (viewOpt->direction == Qt::RightToLeft); @@ -660,7 +660,7 @@ void QCommonStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, Q p->restore(); } break; } -#endif //QT_NO_COLUMNVIEW +#endif //QT_CONFIG(columnview) case PE_IndicatorItemViewItemDrop: { QRect rect = opt->rect; if (opt->rect.height() == 0) diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp index 7e01f6f3d5..746dc20122 100644 --- a/src/widgets/widgets/qplaintextedit.cpp +++ b/src/widgets/widgets/qplaintextedit.cpp @@ -1978,7 +1978,7 @@ void QPlainTextEdit::paintEvent(QPaintEvent *e) } - if (!placeholderText().isEmpty() && document()->isEmpty()) { + if (!placeholderText().isEmpty() && document()->isEmpty() && layout->preeditAreaText().isEmpty()) { Q_D(QPlainTextEdit); QColor col = d->control->palette().text().color(); col.setAlpha(128); diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp index 57af09fef5..e13ea83fd7 100644 --- a/src/widgets/widgets/qpushbutton.cpp +++ b/src/widgets/widgets/qpushbutton.cpp @@ -513,7 +513,8 @@ void QPushButton::focusOutEvent(QFocusEvent *e) Ownership of the menu is \e not transferred to the push button. \image fusion-pushbutton-menu.png Screenshot of a Fusion style push button with popup menu. - A push button with popup menus shown in the \l{Fusion Style Widget Gallery}{Fusion widget style}. + A push button with popup menus shown in the \l{Qt Widget Gallery} + {Fusion widget style}. \sa menu() */ diff --git a/src/widgets/widgets/qsizegrip.cpp b/src/widgets/widgets/qsizegrip.cpp index 82857c8805..f0ede5f2ff 100644 --- a/src/widgets/widgets/qsizegrip.cpp +++ b/src/widgets/widgets/qsizegrip.cpp @@ -197,7 +197,7 @@ Qt::Corner QSizeGripPrivate::corner() const \table 50% \row \li \inlineimage fusion-statusbar-sizegrip.png Screenshot of a Fusion style size grip \li A size grip widget at the bottom-right corner of a main window, shown in the - \l{Fusion Style Widget Gallery}{Fusion widget style}. + \l{Qt Widget Gallery}{Fusion widget style}. \endtable The QSizeGrip class inherits QWidget and reimplements the \l diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp index d2bd7285ca..060d1f9a03 100644 --- a/src/widgets/widgets/qtabbar.cpp +++ b/src/widgets/widgets/qtabbar.cpp @@ -302,7 +302,7 @@ void QTabBar::initStyleOption(QStyleOptionTab *option, int tabIndex) const \table 100% \row \li \inlineimage fusion-tabbar.png Screenshot of a Fusion style tab bar - \li A tab bar shown in the Fusion widget style. + \li A tab bar shown in the \l{Qt Widget Gallery}{Fusion widget style}. \row \li \inlineimage fusion-tabbar-truncated.png Screenshot of a truncated Fusion tab bar \li A truncated tab bar shown in the Fusion widget style. \endtable |