search fix
authortimkoma <timkoma@localhost>
Wed, 27 Jan 2010 16:31:42 +0000 (16:31 +0000)
committertimkoma <timkoma@localhost>
Wed, 27 Jan 2010 16:31:42 +0000 (16:31 +0000)
src/gui/searchtabcontainer.cpp
src/gui/tabcontainer.ui
src/orm/ormrecord.h

index b4c0be4..b0938a6 100644 (file)
@@ -7,7 +7,7 @@ SearchTabContainer::SearchTabContainer(QWidget *aParent) : TabContainer( aParent
 {
     header = new SearchHead(this);
     header->setObjectName(QString::fromUtf8("header"));
-    QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+    QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding);
     sizePolicy.setHorizontalStretch(0);
     sizePolicy.setVerticalStretch(0);
     //sizePolicy.setHeightForWidth(TabContainer::sizePolicy().hasHeightForWidth());
@@ -32,7 +32,8 @@ SearchTabContainer::SearchTabContainer(QWidget *aParent) : TabContainer( aParent
 
     verticalLayout_2->insertWidget(0,searchAgainButton);
 
-    searchAgainButton->show();
+    searchAgainButton->hide();
+    treeView->hide();
 
     connect( header, SIGNAL(searchClicked()), SLOT(searchButtonClicked()));
     connect( searchAgainButton, SIGNAL(clicked()), SLOT(searchAgainClicked()));
index 4f194da..77dcfde 100644 (file)
    <item row="0" column="2">
     <layout class="QVBoxLayout" name="verticalLayout">
      <item>
-      <widget class="TreeView" name="treeView"/>
+      <widget class="TreeView" name="treeView">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+         <horstretch>0</horstretch>
+         <verstretch>1</verstretch>
+        </sizepolicy>
+       </property>
+      </widget>
      </item>
     </layout>
    </item>
index ef074ed..a815c8e 100644 (file)
@@ -134,7 +134,7 @@ QList<T> OrmRecord<T>::load(QSqlQuery query)
         }
         else
         {
-            //qDebug() << "SQL OK";
+            qDebug() << "SQL OK";
         }
     }
 
@@ -143,7 +143,7 @@ QList<T> OrmRecord<T>::load(QSqlQuery query)
     {
         objects << hydrate(query.record());
     }
-    //qDebug() << "Fetch done";
+    qDebug() << "Fetch done";
     return objects;
 }