Browse Source

Add editable and selectionBehavior properties to <sqltablearray>

Neal Wilson 5 years ago
parent
commit
2cff011706
Signed by: Neal Wilson <neal@typica.us> GPG Key ID: 2A0BDDE701E66EB9
1 changed files with 22 additions and 0 deletions
  1. 22
    0
      src/typica.w

+ 22
- 0
src/typica.w View File

@@ -5989,6 +5989,28 @@ void addSaltToLayout(QDomElement element, QStack<QWidget *> *,@|
5989 5989
     {
5990 5990
         view->setObjectName(element.attribute("id"));
5991 5991
     }
5992
+    if(element.hasAttribute("editable"))
5993
+    {
5994
+        if(element.attribute("editable") == "false")
5995
+        {
5996
+            view->setEditTriggers(QAbstractItemView::NoEditTriggers);
5997
+        }
5998
+    }
5999
+    if(element.hasAttribute("selectionBehavior"))
6000
+    {
6001
+        if(element.attribute("selectionBehavior") == "items")
6002
+        {
6003
+            view->setSelectionBehavior(QAbstractItemView::SelectItems);
6004
+        }
6005
+        else if(element.attribute("selectionBehavior") == "rows")
6006
+        {
6007
+            view->setSelectionBehavior(QAbstractItemView::SelectRows);
6008
+        }
6009
+        else if(element.attribute("selectionBehavior") == "columns")
6010
+        {
6011
+            view->setSelectionBehavior(QAbstractItemView::SelectColumns);
6012
+        }
6013
+    }
5992 6014
     if(element.hasChildNodes())
5993 6015
     {
5994 6016
         QDomNodeList children = element.childNodes();

Loading…
Cancel
Save