summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
...
| * QMenu: Do not set snapToMouse if a caused-widget exists.Friedemann Kleint2012-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When clicking at the bottom-right corner of a menu in a menu bar, it appears at the wrong position. Add test and stabilize RTL-tests by making sure the layout direction is cleared should they fail. Task-number: QTBUG-28031 Task-number: QTBUG-2596 Change-Id: Ibc5ae916388753908e9f3ee98e8859faaa0c8723 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Mac: disable transient scrollbar animations for non-QScrollBarsJ-P Nurmi2012-12-113-8/+12
| | | | | | | | | | | | | | | | Task-number: QTBUG-28389 Task-number: QTBUG-28380 Change-Id: I91edd9c8aba60118d722bbf9ad5b85f994398823 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * QApplication docs: restore console mode -snippetJ-P Nurmi2012-12-112-14/+25
| | | | | | | | | | Change-Id: I1f8ce949ae660a209a2092a2863d5c25e2908004 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * QScrollBar::initStyleOption(): fix QStyle::State_On handlingJ-P Nurmi2012-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | QWindowsStyle considers QStyle::State_On as pressed, whereas QMacStyle uses the same state for transient scrollbars. Thus, to indicate transient scrollbars, QScrollBar::initStyleOption() must set QStyle::State_On only when the current style actually supports transient scrollbars. Task-number: QTBUG-28523 Change-Id: I94d207b1e8c5c4bd6f4b99e8b4f1661197fbe9dd Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * QGraphicsView - fix rubberband to expand on wheel eventThorbjørn Lund Martsum2012-12-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In SHA 51914375b615ddcac711171ac31779fea01b4323 the rubberband selection was fixed, so it followed the scene-point on mousemove. However wheelEvent could move the view - but avoid update of the rubberband (that would not be updated until next mouse-move). This patch fixes that (and generally improves rubberband behavior) since QGraphicsViewPrivate::mouseMoveEventHandler is called by replayLastMouseEvent, which is called from various places, where we need to update the rubberband (e.g scrollContentsBy). Change-Id: I1b78c27edaaecea797a2319086d7a11d437d2bd3 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * QGraphicsView - move rubberband-handling into a private functionThorbjørn Lund Martsum2012-12-112-48/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves the rubberband-handling from QGraphicsView::mouseMoveEvent to QGraphicsViewPrivate::updateRubberBand. This function is then called from QGraphicsView::mouseMoveEvent. I have removed some d-> and added some q-> but beside that nothing is changed in the code. Change-Id: Iab70c55635c43733e0e02bb70e2bb03b90bf62f0 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Remove QT_DLL and QT_NODLL defines.Stephen Kelly2012-12-111-2/+2
| | | | | | | | | | | | | | Task-number: QTBUG-28044 Change-Id: Ib8c4e1e8e52703aa6590875c34f05b6bc71db808 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| * QGraphicsView - add const to a not modified local variableThorbjørn Lund Martsum2012-12-111-1/+1
| | | | | | | | | | | | | | | | | | The QPointF ep is not modified. There is no reason it shouldn't be const. Change-Id: I41fb8f9ae5296a7a40f7eb8be13fc14d56915e3f Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * QGraphicsView - remove reference to avoid weird code.Thorbjørn Lund Martsum2012-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | Even though the code before theoretic is ok, we really shouldn't have a reference since mapFromScene returns a QPointF and not a const QPointF&. Change-Id: I5ea8fd238bdbdd21fb1e3b6b5f280d45e3bc43ef Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Hardcoded url for Mac Os X Aqua QTBUG-28500Nico Vertriest2012-12-111-2/+2
| | | | | | | | | | Change-Id: I83d87d155b7ca502098a53e955fdde3c908e3300 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * Hardcoded url Item View Classes QTBUG-28500Nico Vertriest2012-12-111-3/+0
| | | | | | | | | | | | | | Removed link to Item View Classes in Qt4 Change-Id: Ic3c38a33edc88faf072b8fe7e3accfe1ee75ac78 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * QtBase: Doc: Fix Links to designer manual.David Schulz2012-12-101-1/+1
| | | | | | | | | | Change-Id: I87f68fb70aa773c44b90b58bd56fc5585a7e4107 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
| * Compile with QT_NO_CURSOR.Volker Krause2012-12-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Mostly straightforward, the a11y changes might look a bit drastic, but the base class QAccessibleTextWidget was already disabled in this case, so we have to obviously take out its sub-classes as well. Change-Id: I682ace20d6938688ddb1da23c3463f3c025fab8e Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
| * Fix typos and style in QToolBar documentationDavid Gil2012-12-071-15/+15
| | | | | | | | | | Change-Id: Ic4b4e18746382bae1b6dae009e1e5663c7a21a84 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Mac: Missing update when hovering from one scrollbar to anotherGabriel de Dietrich2012-12-061-3/+3
| | | | | | | | | | Change-Id: I9837bb72935cb4e3680e4bd23b5535f654b5fde6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * Mac: Transient scrollbars should overlap in the corner on 10.8Gabriel de Dietrich2012-12-061-1/+9
| | | | | | | | | | Change-Id: Ied239d5e3cb05bed6b892607f0344e6daa028918 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * Mac: Animated expanding scrollbars on 10.8Gabriel de Dietrich2012-12-062-29/+76
| | | | | | | | | | Change-Id: Ib57d0347a7828ac7582b0fa95adf8d437694cd41 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
| * Mac: Cleaner transient scrollbar renderingGabriel de Dietrich2012-12-061-14/+7
| | | | | | | | | | | | Change-Id: I617588012aa5166775c3c6301ee70043b22553a3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
| * Docs: fix QStyle related warningsJ-P Nurmi2012-12-065-20/+21
| | | | | | | | | | Change-Id: I4e67e34ecc0fc8050938a681b2c393b8442fce2e Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * QtWidgets docs: use WinVista screenshots instead of obsolescent WinXPJ-P Nurmi2012-12-0621-45/+45
| | | | | | | | | | Change-Id: Ic7fd291d4ce4468ae12cf5dd102fbcc45387dd87 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * export only 'host_bins' to pkg-config, rather than a random selection of toolsOswald Buddenhagen2012-12-061-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the "export location" of the linguist tools was just bogus, and lconvert was missing anyway. the two dbus tools and qdoc were missing, too. generally, it seems useless to report the paths of some random tools - instead, just report the install location of the host binaries and let users figure out the complete paths themselves - this should be ok, as we decided that distributors are not supposed to do tool renaming any more. for the binary path just use the final location, as the files won't be used before installation anyway. this allows us removing the scary generic prefix replace from the pc file installs. and as a side effect this also fixes debug_and_release builds of core and widgets by not loading various prf files prematurely and thereby messing up the dir replacement magic. Task-number: QTBUG-28286 Change-Id: I99de419301fc07fb923959db4bd5cab9072d1c31 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * doc: Fix Graphics View example docsEskil Abrahamsen Blomfeldt2012-12-061-1/+12
| | | | | | | | | | | | | | | | | | | | | | Make the same layout of the new graphics view example documentation as we had before (except by using annotatedlist instead of hardcoding the links). I've also moved four examples from qtdoc to qtbase so that they can be included in this documentation. Change-Id: Ic2202ade119cadd98d036f1bd77e91dae49b5677 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
| * compile with QT_NO_TOOLTIPMontel Laurent2012-12-051-0/+3
| | | | | | | | | | Change-Id: I9e769a343a9dd74dc80cffebfe9ad97981596036 Reviewed-by: David Faure <david.faure@kdab.com>
| * Fix typos and style in QSplitter documentationDavid Gil2012-12-051-18/+17
| | | | | | | | | | | | Change-Id: Ieacbfd06067ae1ca687030204125814bd9e48bd8 Reviewed-by: Johan Thelin <johan.thelin@pelagicore.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * properly syncqt-ize harfbuzz headersOswald Buddenhagen2012-12-041-2/+0
| | | | | | | | | | | | | | | | | | we were already installing them into QtCore/private, so turn them into proper private headers to start with. this cleans up our project files. Change-Id: I0795f79e03b60b5854de9e4dc339e9b5a5e6fd87 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * Moved the mainwindow examples from qtdocGunnar Sletta2012-12-042-0/+15
| | | | | | | | | | Change-Id: I5a11933e86c6c71f68a55e45c7bcfdfc702bf4e6 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * Fix linking of itemviews and graphicsview examplesChristian Stenger2012-12-043-1/+28
| | | | | | | | | | Change-Id: I6905cc6945e2eb396108f9fb16da042e576e3afb Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * Clear focus of GraphicsItem focus scopes and their children.Andrew den Exter2012-12-041-3/+9
| | | | | | | | | | | | | | | | | | | | A focus scope has effective focus if one of its children is the focus item, clearFocus() should remove effective focus from an item and its children not just from the focus item. Task-number: QTBUG-28328 Change-Id: I62a292eff000151e50b2f5221e22f326a380fc3a Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
| * Compile with QT_NO_GESTURES.Volker Krause2012-12-031-1/+1
| | | | | | | | | | Change-Id: I9f8f7c586ccb5de227ec42af44159af90b39d1dd Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
| * Merge branch 'master' into stableOswald Buddenhagen2012-12-031-0/+2
| |\ | | | | | | | | | Change-Id: I5c0c9a131cca64fea3bc784339d14d84076edc1a
| | * Compile with QT_NO_COLORDIALOG.Volker Krause2012-12-031-0/+2
| | | | | | | | | | | | | | | Change-Id: I37e3fed497f3595942662efb22114de57ea4c9db Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | Tag dialog examples and create dialog examples groupGunnar Sletta2012-12-032-0/+17
| | | | | | | | | | | | | | | Change-Id: I0049b841dd5aee806e8aed36af069b0507e3c9f1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * | Stop using the name "Trolltech" in QSettingsSergio Ahumada2012-12-031-2/+2
| |/ | | | | | | | | | | | | | | | | Also change Trolltech for QtProject in other places Task-number: QTBUG-23269 Change-Id: Ie4e344f23cab77c575562d18b481b3369ce30491 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | QAbstractItemView - allow deselect in single selection mode.Thorbjørn Lund Martsum2013-01-021-1/+19
| | | | | | | | | | | | | | | | | | This patch allows single selection to be cleared with the normal control modifier. This affects e.g QTreeView and QListView. Task-number: QTBUG-8836 Change-Id: I7fd50b987acc3552b36657409568192763257536 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Fix typo in QWidget::setLayout() documentation.Mitch Curtis2012-12-211-1/+1
| | | | | | | | | | Change-Id: I4882f01b980d7b89e54be2eeacc3a83fd014d0fe Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* | QMessageBox: Add property 'textInteractionFlags'.Friedemann Kleint2012-12-202-0/+28
| | | | | | | | | | | | Change-Id: Ia7a4801599f18a1202aa89f54e48066e3d271bfb Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Deactivating an inactive panel no longer causes unwanted deactivation.Andreas Aardal Hanssen2012-12-171-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsItem::setActive() is by design not guarded against calls that do not change the current activation state of the item (e.g., calling setActive(true) on an active item or calling setActive(false) on an inactive item). This is to ensure that it's possible to set explicit activation state on items, either before they are added to a scene, or while the scene itself is inactive. Before this fix, calling setActive(false) on a panel item that is not currently active would by accident clear activation from any other panel that might have focus. After this fix, activation is only cleared if the item setActive() was called on itself is the active panel, or is the panel that will regain activation once the scene is reactivated. Task-number: QTBUG-28544 Change-Id: Ic4752f1e4400f9a0660bc968834747610212bb52 Reviewed-by: Bjørn Erik Nilsen <post@bjoernen.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Add new signal: QGraphicsScene::focusItemChanged().Andreas Aardal Hanssen2012-12-173-7/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This signal is emitted by QGraphicsScene whenever focus changes in the scene (i.e., when an item gains or loses input focus, or when focus passes from one item to another). You can connect to this signal if you need to keep track of when other items gain input focus. It is particularily useful for implementing virtual keyboards, input methods, and cursor items. Task-number: QTBUG-10570 Change-Id: I9cbbd9a2d15d6f568e1597c2c33ec049eb70f793 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Make sure panels always gain focus when activated or tab is pressed.Andreas Aardal Hanssen2012-12-171-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes behavior, but I would argue it's a good change. If you create a panel and activate it (e.g., by simply showing it or reparenting it onto an already-visible item), you expect the panel to gain focus / which is sort of the whole point of activating it. Prior to this change, you had to have explicitly called setFocus() on one of the panel's children, which would give that item subfocus, for that item to auto- gain focus when the panel was activated. This change makes it more automatic. If the panel itself or any of the widgets in its focus chain can gain focus, they will gain focus when the panel is activated. So the new logic is - if the panel already has a focus item, so if someone explicitly set subfocus on an item before the panel is shown, that item gets focus. Otherwise, if the panel itself can gain focus (e.g., someone makes a line edit / text edit panel), it gains focus when activated. Otherwise, we search the focus chain until we find the first item that can gain focus. This last case is the file dialog case, where the dialog itself can't gain focus but typically the first item in the focus chain is the primary focus widget, such as the search field or the directory list view. The change also fixes this for the first Tab. If you clear focus on a panel, the user expects to be able to press Tab to regain focus. Prior to this change that didn't happen. Now, the panel or the first in the focus chain that can get focus gets focus on first tab. Task-number: QTBUG-28194 Change-Id: Id7ec1741d0d5eb4ea845469909c8d684e14017f1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Remove some dead code from QLabel::paintEvent()Andy Shaw2012-12-111-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | The code removed was in a if (d->control) block and therefore d->control was always going to be true thus rendering the nested if invalid. The case that this would account for is already handled in the else for the parent if so this code is in effect not needed. Change-Id: I799383e238560a8a8e3d7dc073d3b1ee74269f90 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | Repair QGraphicsWidget focus chain when used with ItemIsPanel.Andreas Aardal Hanssen2012-12-073-78/+96
|/ | | | | | | | | | | | | | | | | Add handling of the focus chain to QGraphicsItem::setFlags(), so that the focus chain is repaired (panels pop out of the chain and non-panels merge back in) when the ItemIsPanel flag is toggled. Add handling focus chain to QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting for panels. Before this fix, you must enable the ItemIsPanel flag before adding the item as a child to a parent panel, and you lose focus when using the tab key to focus around a panel after it has been reparented into another panel. Task-number: QTBUG-28187 Change-Id: I1d0d81a90697eaf715a8a337c8bf6c2159329e68 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* [QTBUG-27420] Make Q{Box,Grid,Form}Layout::takeAt() unparent a nested layoutMarc Mutz2012-12-023-5/+23
| | | | | | | | | | | QStackedLayout doesn't have support for QLayout, only QWidget, so the issue doesn't arise there. Reported-by: Johannes Schaub Task-number: QTBUG-27420 Change-Id: I71f8d10a036918c16d8f8c9197a2ec61cd76cf01 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Move gestures overview from qtdoc to qtbase; mention Qt QuickShawn Rutledge2012-12-014-9/+225
| | | | | | | | | | | | On the one hand this doc reads like an overview, but didn't mention Qt Quick; on the other, the gestures framework is questionable, and in any case is solidly in the widgets module, not reusable for Qt Quick. So, just added some comments at the end to make it clear that Qt Quick takes a different approach. Also changed the relevant links because the title has changed. Change-Id: I66a0c0c106f496de26fb8947e90826ef39ccfddd Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Basic high-dpi "retina" support for Qt 5.Morten Johan Sørvig2012-12-018-70/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | Bring Qt 5 on par with Qt 4, prepare for more comprehensive support later on. Introduce device independent pixels (dips), device pixels, and devicePixelRatio. Add high-dpi support to QPainter, QGLWidget, the cocoa platform plugin, mac and fusion styles. Dips are similar to CSS pixels, Apple points and Android density-independent pixels. Device pixels are pixels in the backing store/physical pixels on screen. devicePixelRatio is the ratio between them, which is 1.0 on standard displays and 2.0 on "retina" displays. New API: QImage::devicePixelRatio() and setDevicePixelRatio() QPixmap::devicePixelRatio() and setDevicePixelRatio() QWindow::devicePixelRatio() QScreen::devicePixelRatio() QGuiApplicaiton::devicePixelRatio() Change-Id: If98c3ca9bfdf0e1bdbcf7574cd5b912c9ff63856 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* QWidget windows have fullscreen button by default; manual test for itShawn Rutledge2012-12-012-2/+3
| | | | | | | | | | It's again possible for QWindows and widget windows to go into fullscreen mode on the Mac. Change-Id: I7b304a135838394ef0392f89be4f225f2949fad3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Renamed the keyboard-focus doc to make clear it's about WidgetsShawn Rutledge2012-12-014-4/+5
| | | | | | | Also link from the widgets index page. Change-Id: I49cd415b09d7458d89d75931ecfaafe29c226c6f Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Mac: Fix small button metrics, menu indicator alignmentGabriel de Dietrich2012-12-011-2/+6
| | | | | | Task-number: QTBUG-28275 Change-Id: I08de3cc7fee3af725c66ed081072277b2ca32601 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* WINCE: Fix renameing of resource filesAndreas Holzammer2012-12-011-2/+2
| | | | | | | | The standard resource files where renamed, so fix the include for qmenu in Windows CE. Change-Id: Id29dd8e1028cf438f4d483126a74994fc1e310d7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QGraphicsView - fix rubberband to stay right on scrollThorbjørn Lund Martsum2012-12-011-1/+1
| | | | | | | | | | | | | | We should consider the scene-position when we are expanding moving a rubberband. If the user does some auto-scroll (Qt should support that itself, but that is another matter) then the rubberband should not keep the (old) local position to calculate the rubberband extension, but instead use the scene-position that was actually clicked. Change-Id: I04a2df6a1edae8b3587e1ac2104c7fe4ccfb7762 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix compile with -DQT_NO_WIZARDMontel Laurent2012-12-012-2/+4
| | | | | Change-Id: I6f7be895b8c4a1a65de43ee35d1fab25a30a25c6 Reviewed-by: David Faure <david.faure@kdab.com>