octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: spacing for the GUI wokspace viewer


From: John W. Eaton
Subject: Re: spacing for the GUI wokspace viewer
Date: Thu, 11 Apr 2013 14:59:57 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11

On 04/11/2013 02:46 PM, Daniel J Sebald wrote:

Qt's scheme is that there is a "model" (the data), and a "view" which
handles displaying the model. To adjust the amount of whitespace around
table entries is probably done inside "workspace-viewer.cc".

Yeah, I understand that, but I don't know how to do it, which is why I'm asking. Is it possible to adjust the spacing somehow? I don't the methods to do it. I thought some Qt expert here would see immediately what needs to be done.

The following did not seem to work for me.


diff --git a/libgui/src/workspace-view.cc b/libgui/src/workspace-view.cc
--- a/libgui/src/workspace-view.cc
+++ b/libgui/src/workspace-view.cc
@@ -44,6 +44,11 @@
   view = new QTableView (this);

   view->setWordWrap (false);
+  view->setShowGrid (false);
+  view->setAlternatingRowColors (true);
+  view->resizeColumnsToContents ();
+  view->resizeRowsToContents ();
+  view->horizontalHeader()->setResizeMode (QHeaderView::Stretch);
   view->setContextMenuPolicy (Qt::CustomContextMenu);

   // Set an empty widget, so we can assign a layout to it.


jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]