summaryrefslogtreecommitdiffstats
path: root/examples/sql/sqlbrowser/qsqlconnectiondialog.ui
Commit message (Collapse)AuthorAgeFilesLines
* sqlbrowser example: use idiomatic Qt [3/3]: use form-layoutMarc Mutz2025-01-021-7/+1
| | | | | | | | | | | | | | The old code used a grid layout inside the QGroupBox, but the design with labels in the first and edit-widgets in the second column lends itself to a QFormLayout, which adapts the alignment of the widgets to the platform style, so use that. Amends 2690822428deec4f0c08f4d118d69a7c6036369e, which, however, inherited all of the above from even older code. Pick-to: 6.9 6.8 Change-Id: I528f0ce9d8cb7a997fbfabcdca887c059f571b38 Reviewed-by: Volker Hilsheimer <[email protected]>
* sqlbrowser example: use idiomatic Qt [2/3]: use button-box / override accept()Marc Mutz2025-01-021-42/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The old code used two QPushButtons in a QHBoxLayout to provide Ok/Cancel buttons. This hard-codes the positions and text (and icons) of these buttons, instead of adapting to the platform style. The new code simply uses QDialogButtonBox, which is designed for this purpose. - Also, the old code connected the Ok button's clicked() signal to a custom slot that then called QDialog::accept(). This means that the code in the custom slot is not executed when the dialog is accepted by other means (e.g. return press in one of the line edits ("auto-default"), though I'm not sure here). The new code uses the idiomatic Qt way of overriding QDialog::accept() instead, and connects the button-box's accepted() signal to it. This is done in the .ui file, so it already works in Designer preview. - Finally, the old code made a manual connection from the Cancel button to QDialog::reject(). The new code uses the Qt idiom of connecting in the .ui file directly, using QDialogButtonBox::rejected() as the signal. Amends 2690822428deec4f0c08f4d118d69a7c6036369e, which, however, inherited all of the above from even older code. Pick-to: 6.9 6.8 Change-Id: I83afd6156a0811e0c0f99f2480625ea6b69ff78b Reviewed-by: Volker Hilsheimer <[email protected]>
* sqlbrowser example: use idiomatic Qt [1/3]: disabling group-boxMarc Mutz2025-01-021-1/+18
| | | | | | | | | | | | | | | | | | | The old code connected to the wrong signal and therefore had to write a custom slot to perform the disabling of the group-box. The new code simply connects the QCheckBox::toggled(bool) signal to the directly-compatible QWidget::setDisabled(bool) slot, removing the need for a custom slot. Also move the connection into the .ui file, so it works already when checking the form in QtDesigner. Amends 2690822428deec4f0c08f4d118d69a7c6036369e, which, however, only inherited the issues from older code. Pick-to: 6.9 6.8 Change-Id: Ia834f92de270bb7b18981273188f6e5b6cd457a2 Reviewed-by: Volker Hilsheimer <[email protected]>
* Move all other demos in qtbase to examples.Casper van Donderen2011-06-241-0/+224
Change-Id: Iab0e7364d1f6b348d0e3033ea9304139f5bd6d0d Reviewed-on: http://codereview.qt.nokia.com/617 Reviewed-by: Qt Sanity Bot <[email protected]> Reviewed-by: David Boddie