summaryrefslogtreecommitdiffstats
path: root/src/widgets
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Check before including the \snippet from a .pro fileVenugopal Shivashankar2018-08-301-0/+2
| | | | | | Change-Id: Icc7552b46a2657c81958e40f33596ddeee045172 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* doc: Add missing override and remove redundant virtual for snippetsAlexander Volkov2018-08-1613-36/+36
| | | | | Change-Id: I2395fd01b93c4ea364225e0cf1a5f59908b691d0 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Make QMessageBox window with the detailed text closableAlexander Volkov2018-08-141-0/+10
| | | | | | | | | | | | | | | | | | QMessageBox window ignores QCloseEvent if it was created with Ok button and the detailed text was set. But it can be closed if it contains only one button. Make it closable if there are two buttons and one of them is the "Show Details..." button. [ChangeLog][QtWidgets][QMessageBox] A message box with two buttons, one of which is the "Show Details..." button, can be closed by clicking the X button on the window's title bar. Task-number: QTBUG-69526 Change-Id: Iba09e38561eb3898dc2aecfd38d8519d512a71c1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Update out-of-date image in QColorDialog documentationPaul Wicking2018-08-031-0/+0
| | | | | | Task-number: QTBUG-58420 Change-Id: Ib5c7a3f681b082182cf6ec9aa62028b7040e81bf Reviewed-by: Martin Smith <martin.smith@qt.io>
* QCommonStylePrivate::viewItemSize: Fix text width bounds calculationAles Erjavec2018-08-021-8/+11
| | | | | | | | | | | The width of the icon was subtracted out of the available text area width even when the value of the `decorationPosition` was Top/Bottom. Task-number: QTBUG-69404 Task-number: QTBUG-30116 Change-Id: I501ffc0dab0cff25e525c26adf9bdb060408927b Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QLabel: Use nullptr in documentationAndre Hartmann2018-08-011-5/+5
| | | | | Change-Id: Idc3a5a40e33ddb4257e46d7b6f3279ca14241911 Reviewed-by: Martin Smith <martin.smith@qt.io>
* QWidget: Add note about fixPosIncludesFrame not supporting window statesTor Arne Vestbø2018-08-011-0/+6
| | | | | Change-Id: Iee841e7e6552e24f2b62b0c2df5df3c432680eef Reviewed-by: Gatis Paeglis <gatis.paeglis@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>
* Reset geometry constraints when removing stylesheetSergio Martins2018-07-171-4/+1
| | | | | | | | | | | | CSS geometry constraints such as "min-height" or "min-width" will set size constraints on the widget. Removing the stylesheet should remove these constraints. Task-Id: QTBUG-69418 Change-Id: I1008e4390281c90112303d72dd7d59a8acddfcd9 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* QCalendarWidget: update the year label correctly on locale changeEirik Aavitsland2018-07-161-1/+1
| | | | | | | | | | The year label in the header would show an unlocalized year number. Fix by setting it equal to the year editor's correctly localized string. Task-number: QTBUG-69038 Change-Id: I87148c607b8fb498c57bcf59bc175154c9e445d1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QLineEdit: Fix behavior of DeleteStartOfWord keyAlexander Volkov2018-07-161-1/+2
| | | | | | | | | DeleteStartOfWord key behaves like Delete key when the cursor is at the beginning of the line. Do nothing instead. Task-number: QTBUG-65855 Change-Id: I56402961b44ec6fe3a382df68a76db36891c4522 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Remove redundant \codePaul Wicking2018-07-131-4/+0
| | | | | | | | | | | The preceding snippet contains the same line of code. It is unclear why this line is repeated, and it does not seem to serve a purpose. This patch removes the line of code and the QDoc command used to set it apart from the preceding snippet. Task-number: QTBUG-56772 Change-Id: I400b22aa75ee4542bfb67f7e47e3c31c577a39e5 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Doc: Explain emission of QAction::changed on calling QAction::togglePaul Wicking2018-07-111-2/+6
| | | | | | | | | | Extend description of QAction::checked() and QAction::toggled(), as it is not clear from the documentation that calling QAction::toggle causes the emission of a QAction::changed signal. Task-number: QTBUG-68213 Change-Id: I5afa4d9a6e6f001dff81271d1e34d0c515da3c24 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Show the toolbutton's menu in the right place on multiple screensAndy Shaw2018-07-101-2/+2
| | | | | | | | | | | When a screen is positioned to be above another, then the toolbutton menu could be shown on the wrong screen if it was deemed to not fit below the button the same screen. This ensures that it shows it on the right screen when there is sufficient space to do so. Change-Id: Ia626b28f74c1931904ff5b30cca17e63914d3c79 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QSplashScreen: Pass the layout direction set on widget to the painterAndy Shaw2018-07-101-0/+1
| | | | | Change-Id: I6adc9f6fd77b6e9f9387393884e13285f4452018 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QMenuBar: Account for displays that are above 0x0Andy Shaw2018-06-291-1/+1
| | | | | | | | | | | | If a display is placed above a primary screen which has the top left set to be 0x0, then menus that are defaulting to go up can still be displayed on that screen when the menubar is placed on the bottom of it. This ensures that this is the case and also adds a manual test to aid verification of it in the future. Change-Id: Ib657ccdc1aabfe1586c72585c087ac80a6c632c2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Return a correct filter from QFileDialog::selectedMimeTypeFilter()Alexander Volkov2018-06-271-13/+30
| | | | | | | | | | | | | | | | QFileDialog::selectedMimeTypeFilter() returns either an empty filter in the case when a platform file dialog doesn't implement mime type filters, or initiallySelectedMimeTypeFilter() in the case of Qt's file dialog. In both cases the result is incorrect. Make it return a mime type filter corresponding to a selected name filter. As a result, tst_QFiledialog::setMimeTypeFilters() has to be fixed: QFileDialog::selectMimeTypeFilter() can't select a name filter for an invalid mime type, and "application/json" is not supported by RHEL 6.6, so replace it by "application/pdf". Change-Id: I58d3be860a9b5e8a72cba86d74b520178115a812 Reviewed-by: David Faure <david.faure@kdab.com>
* Fix interaction with the menu bar on touchscreensAlexander Volkov2018-06-251-1/+8
| | | | | | | | | | | | | | Ignore synthesized mouse move events whithout the left mouse button pressed. We receive such mouse move event on touch before the mouse press event, it causes the menu to show and then the subsequent mouse press event closes the menu. Also don't propagate mouse events after closing a popup to another popup, because they may close the latter one. Change-Id: I50a2d9b57da63d33ffe416161a09f1696d65c88f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Doc: Add missing full stops in briefsPaul Wicking2018-06-212-2/+2
| | | | | | Task-number: QTBUG-68933 Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QHeaderView: Send the StatusTip events to itself if there is no parentAndy Shaw2018-06-141-1/+1
| | | | | | | | | | If there is a parent (typically an itemview) then StatusTip events should be sent to that. However in the case of there not being a parent then the event should be sent to the QHeaderView itself. Task-number: QTBUG-68458 Change-Id: I2a8c11c973210c7adf1bf29443f224f968a357a9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Merge 5.11 into 5.11.1Oswald Buddenhagen2018-06-073-1/+6
|\ | | | | | | Change-Id: I28f48e980a9e23ddde5251608dd9d1d83df65392
| * Fix build for Android with android-clang in r17Liang Qi2018-06-061-1/+1
| | | | | | | | | | | | Task-number: QTBUG-67464 Change-Id: Ib971a5da82b31bce9ac1c9ac623ad7d5302cfaec Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Fix building with -no-feature-dirmodel -no-feature-filesystemmodelJoni Poikelin2018-06-041-0/+1
| | | | | | | | | | Change-Id: I7ab90043b2bf6ee41412480f72eb701230cecb38 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * QAbstractSpinBox: Add more documentation cross linksAndre Hartmann2018-06-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | stepUp() and stepDown() already linked to stepBy(), so add the reverse too. keyPressEvent() talks about stepBy() too, so add it to the cross reference. Change-Id: I22c841821331eaed9607cfb2807dcf0e2886d952 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Don't set the wasDeleted flag in ~QWidgetLars Knoll2018-06-072-1/+4
|/ | | | | | | | | | | | | | | | Setting it too early can cause issues, as we are still doing lots of work here as e.g. calling hide() on children. But the flag is required when we delete the declarative data, so set and reset it when destroying that data. Amends c579f49e2a80a55a4004ff8e5b2ee76bda146387 Task-number: QTBUG-68637 Change-Id: I7ed35828c26912aa6d703ba6025e46b7911353fa Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Render QOpenGLWidget/QQuickWidget with AlwaysStackOnTopAllan Sandfeld Jensen2018-05-311-14/+16
| | | | | | | | | | | QWidget::render was ignoring QOpenGLWidget/QQuickWidget with AlwaysStackOnTop set, because normally they will be composited later, however when not doing a backing store render, they need to be painted right away as there is no later. Task-number: QTBUG-67533 Change-Id: I08e2eeee5e7a8f0dbbf43f659fcfa9068e8c46d1 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QAbstractSpinBox: Fix missing frame conditionGabriel de Dietrich2018-05-301-1/+1
| | | | | | | | Wrong check for SH_SpinBox_ButtonsInsideFrame in initStyleOption(). Change-Id: I35c6ff4d007f171fe44d7f3e5734c6f4586d871b Task-number: QTBUG-68238 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Make sure we can build with -no-feature-draganddropJoerg Bornemann2018-05-2945-133/+152
| | | | | | | | | We move QInternalMimeData to a separate file, because this class is used, even if draganddrop is disabled. From now on, include qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData. Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* QFusionStyle: Fix width of editable combo boxFriedemann Kleint2018-05-151-1/+1
| | | | | | | | Add a scaling overlooked in 63d08003cf06b84b871618ba800a7079ae6bf702. Task-number: QTBUG-68194 Change-Id: I97c771435e4316ec55aacc527335b62cb4dfd9ec Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Fix build without features.cursorTasuku Suzuki2018-05-151-11/+15
| | | | | Change-Id: I450bd9f160c64f718c49e87d274c1ccc4a657aca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix build without features.completerTasuku Suzuki2018-05-091-0/+2
| | | | | Change-Id: Idc79921f85a920bc8c1280513ce78ee0cb00d415 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix building with -no-feature-shortcutJoni Poikelin2018-05-081-0/+2
| | | | | Change-Id: I7576055a6d81d6a7a075ebff16ca6b0ced4e984e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix Clang 6 warning about comparing different enumsThiago Macieira2018-05-041-1/+1
| | | | | | | | | qdialogbuttonbox.cpp:862:14: error: comparison of two values with different enumeration types in switch statement ('QDialogButtonBox::ButtonRole' and 'QPlatformDialogHelper::ButtonRole') [-Wenum-compare-switch] Change-Id: I3840d727dee443318644fffd1529350b81678712 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash in QMacPanGestureRecognizerJan Arve Saether2018-05-022-2/+17
| | | | | | | | | | | | | | | | | | The reason it crashed was this: 1. Button was pressed => _panTimer started with the graphics view as destination. 2. Button was released => the graphicsview is destroyed 3. 300 ms later: Qt tries to deliver TimerEvent from _panTimer to the graphics view. Unfortunately, the graphics view is deleted, but Qt doesn't know that... (*crash*) We therefore chose to start the timer with a destination we are controlling the lifetime of: the QMacPanGestureRecognizer. Inside the timerEvent of that we can check if the actual target is already destroyed. Task-number: QTBUG-60404 Change-Id: Iff8f5b7217de42c4c5cf551ca507f0cff1c99a78 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Convert features.toolbar to QT_[REQUIRE_]CONFIGStephan Binner2018-05-0227-155/+160
| | | | | | | | Move declaration of pick/perp helpers up the dependency chain Change-Id: I7084ed829a057a0c45d60445c416fb07f2cb5624 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Remove assert from QFormLayout::takeRow()Sergio Martins2018-04-301-2/+0
| | | | | | | | | | Having rows without fields is a supported use case so it shouldn't assert. Code works quite well in release mode, but crashes in debug mode. Change-Id: I1c4f736318489bae09780fcdb56136181afcac17 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix for input method commit that ends with newlinePaul Olav Tvete2018-04-271-1/+6
| | | | | | | | | | | | | If the input method event contains a commit text that ends with a newline, text, the commit string is inserted first. This changes the current block. This change makes sure that we apply the formatting changes (including removing the old preedit text) to the old block in this specific case. Task-number: QTBUG-67836 Change-Id: Ia83963780fb14b3c571dbbe3eb81fbbe20fbf412 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QWidgetWindow: Immediately forward close events to QWindowUlf Hermann2018-04-271-0/+1
| | | | | | | | | This way the platform window is destroyed in a timely manner, preventing redundant close events from the window system. Task-number: QTBUG-43344 Change-Id: Ifdfca59ceacef54405f1c227c493dc514a1b27ea Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix build with -no-feature-graphicsviewPaul Olav Tvete2018-04-251-0/+1
| | | | | | Change-Id: Idddd353695d2a24ed90c29f557abfedf11d82fbc Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Style sheets: detect and use font set on QHeaderViewsGabriel de Dietrich2018-04-241-5/+7
| | | | | | | | | | | We also ask the parent style to draw the header label instead of the base style which is more likely to respect other text related parameters. Change-Id: I6dd658fa4d016a76d7c450478dc42f07e4b807c4 Task-number: QTBUG-33855 Task-number: QTBUG-37153 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix QML integration of widgetsLars Knoll2018-04-231-1/+2
| | | | | | | | | | | | | We need to mark the object as deleted before destroying it's declarative data, otherwise all sorts of bad things can happen. This fixes the qwidgetsinqml autotest in qtdeclarative. Change-Id: I05a645ebe1ca7a50c8927e3dbd9ebb5aaf369a71 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 3e91625b58b4d7d2757678de9d77eef91e84df36) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Style sheets: Include margin while calculating QHeaderview section sizePeng Wu2018-04-221-2/+4
| | | | | | | | | Align with QCommonstyle QHeaderview section size calculation. Change-Id: I4c11e1881f48850ace3bdbb3c96f999cc298c91e Task-number: QTBUG-56457 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QTabWidget: clarify ownership after insertTab() and addTab()Anton Kudryavtsev2018-04-201-4/+8
| | | | | Change-Id: I7cd3aa5c092c99bbafd09c4bea7c6824d0b6740a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Send ShortcutOverride event when receiving a non-spontaneous key pressAndy Shaw2018-04-201-2/+14
| | | | | | | | | | | | | | | When a key press is received which is not spontaneous then it needs to be manually sent as a shortcut override event to ensure that any matching shortcut is triggered first. This enables emulation/playback of recorded events to still have the same effect. [ChangeLog][QtWidgets] Sending a key press event with sendEvent() now sends a ShortCutOverride event first to the widget to trigger any shortcuts set first. Task-number: QTBUG-48325 Change-Id: Iafcc2cdb1773bffe89edaeb0abc44cd5a51088e6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QToolTip: Hide tooltip on key event on macOSGabriel de Dietrich2018-04-181-7/+5
| | | | | | | | | This brings back Qt 4 behavior. The difference is that we only ignore modifier-only key events, as it's done natively. Task-number: QTBUG-49462 Change-Id: I02f2313e1164ba185336d80ac5cc16ce6d883b79 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QSplitter: fix doc for widget() and handle()Anton Kudryavtsev2018-04-181-4/+5
| | | | | | Change-Id: I7b8a0ba9f6b99eae22c2230c761d7a14045256db Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Don't ignore the shortcut when the QMenuBar is parentlessAndy Shaw2018-04-181-1/+8
| | | | | | | | | | | | With Cocoa it is possible to have a parentless QMenuBar so that the same one can be used for multiple windows. Therefore if the top level window is the QMenuBar when checking for the context then we can let it carry on as if the top level window is the same as the active window. Task-number: QTBUG-45453 Change-Id: Ifacf2111d5f9973afe8af30c6338918f130e51a4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* dockwidgets: Resize the rubber-band when our drop target is resizedSergio Martins2018-04-122-1/+18
| | | | | | | | Bug can be seen on the .gif attached to QTBUG-67611, the floating group window resizes, but the rubber band still has the old size. Change-Id: I7232a39574ea06fe036c75c21e7496c0f32f4632 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix grouped dock widget from shifting down when createdSergio Martins2018-04-111-0/+2
| | | | | | | | | | | | | | | | Animated .git attached to the bug report for easy understanding. Looks like we shouldn't set window flags after a setGeometry() and before having the window resources. If we do that, then the requested geometry won't be honoured. No idea if it can be fixable in the QPA and won't risk doing it there. Fixes the problem on macOS and Windows. On Linux it was OK, and still is. Task-number: QTBUG-67611 Change-Id: I8244b4956a5ac9afcf257bea762c2c3084b563f8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix z-order when dragging a dock widget over anotherSergio Martins2018-04-111-0/+1
| | | | | | | | | | | | | the drop target would create a floating group window, which would have higher z-order since it just had show() called on it. raise the window we're dragging when the target is mutated into group window. Bug can be seen on the .gif attached to QTBUG-67611. Change-Id: I5dad058468e24327b14d1e7f76c3ad0287d26ee8 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>