Switch to: V9V8V7V6V5

Form Editor - TableView Help

The TableView control provides the ability to show the content of the table as a grid.

This control is bound to the table, view or a query. It allows the user to edit its records. For the table, each change is applied immediately.

Form Editor - TableView

Properties

Form Editor - TableView Properties

  • Data Mode – Defines how the control values changes are applied to the table:
    • Edit – The values are assigned to the fields, but not committed
    • Edit And Commit – The values are assigned to the fields and committed
    • Read-Only – The values can't be changed
  • Fields – The list of the fields to show in the control.
  • Link – The name of the link. If it is set the TableView shows related records from the linked table.
  • Map Fields – The map of the fields, it defines the correspondence between the fields of the form and the table view. If it is set the table view shows only those records for which the values of the mapped fields are equal in the form and in the table view.
  • Map Parameters – The map of the parameters, it defines the correspondence between the fields of the main form and the parameters of the query used in the table view. If it is set the table view shows only the records returned for its query where the parameters are replaced with the values of the mapped fields from the form.
  • Name – The name of the control.
  • Source – The source of the records - it may be the table, view or a query.
  • Horizontal Header – Defines whether the horizontal header is shown or not.
  • Vertical Header – Defines whether the vertical header is shown or not.

Widget

  • Auto Fill Background – This property holds whether the control background is filled automatically.
  • Enabled – Defines whether the control is enabled or not.
  • Font – This property holds the font currently set for the control. The default depends on the system environment.
  • Palette – This property describes the control's palette.

The palette is used by the control's style when rendering. The color roles from this palette are combined with the control's default palette to form the control's final palette. The default depends on the system environment and may be different on different platforms. Control propagates explicit palette roles from parent to child. If you assign a brush or color to a specific role on a palette, that role will propagate to all the control's children, overriding any system defaults for that role.

  • Tooltip – The tooltip text.

Layout Item

  • Alignment – Defines both the horizontal and vertical alignment.
  • Expand Horizontal – If ON the control is expanded horizontally.
  • Expand Vertical – If ON the control is expanded vertically.

Size

  • Width – The width of the control.
  • Height – The height of the control.

Signals

Form Editor - TableView Signals

QAbstractItemView

  • activated( QModelIndex index ) – This signal is emitted when the item specified by index is activated by the user. How to activate items depends on the platform; e.g., by single- or double-clicking the item, or by pressing the Return or Enter key when the item is current.
  • clicked( QModelIndex index ) – This signal is emitted when a mouse button is left-clicked. The item the mouse was clicked on is specified by index. The signal is only emitted when the index is valid.
  • doubleClicked( QModelIndex index ) – This signal is emitted when a mouse button is double-clicked. The item the mouse was double-clicked on is specified by index. The signal is only emitted when the index is valid.
  • entered( QModelIndex index ) – This signal is emitted when the mouse cursor enters the item specified by index. Mouse tracking needs to be enabled for this feature to work.
  • pressed( QModelIndex index ) – This signal is emitted when a mouse button is pressed. The item the mouse was pressed on is specified by index. The signal is only emitted when the index is valid.
  • viewportEntered – This signal is emitted when the mouse cursor enters the viewport. Mouse tracking needs to be enabled for this feature to work.

QWidget

  • customMenuRequested – This signal is emitted when the user has requested a context menu on the control.
  • windowIconChanged – This signal is emitted when the window's icon has changed.
  • windowTitleChanged( title ) – This signal is emitted when the window's title has changed, with the new title as an argument.

QObject

  • created – This signal is emitted after the object is created.
  • destroyed – This signal is emitted immediately before the object is destroyed, and can not be blocked. All the objects's children are destroyed immediately after this signal is emitted.
  • needUpdate – This signal is emitted when the control needs to be updated, for example, on the change of the current record.
  • objectNameChanged( objectName ) – This signal is emitted after the object's name has been changed, with the new object name passed as an argument.