Skip to content
Permalink
Browse files

[processing] better sizing of columns in batch interface

fixes #12706
  • Loading branch information
volaya committed Jun 22, 2015
1 parent 438a61d commit b4edf8af889ac55354da74c4e6b5e79dfddb7ada
@@ -53,6 +53,7 @@ def __init__(self, param, row, col, panel):
self.horizontalLayout.setSpacing(0)
self.horizontalLayout.setMargin(0)
self.text = QLineEdit()
self.text.setMinimumWidth(300)
self.text.setText('')
self.text.setSizePolicy(QSizePolicy.Expanding,
QSizePolicy.Expanding)
@@ -56,6 +56,7 @@ def __init__(self, output, alg, row, col, panel):
self.horizontalLayout.setMargin(0)
self.text = QLineEdit()
self.text.setText('')
self.text.setMinimumWidth(300)
self.text.setSizePolicy(QSizePolicy.Expanding,
QSizePolicy.Expanding)
self.horizontalLayout.addWidget(self.text)
@@ -28,7 +28,7 @@
import os

from PyQt4 import uic
from PyQt4.QtGui import QWidget, QIcon, QTableWidgetItem, QComboBox, QLineEdit
from PyQt4.QtGui import QWidget, QIcon, QTableWidgetItem, QComboBox, QLineEdit, QHeaderView

from qgis.core import QgsApplication

@@ -119,6 +119,15 @@ def initWidgets(self):
for i in xrange(3):
self.addRow()

self.tblParameters.horizontalHeader().setResizeMode(QHeaderView.Interactive)
self.tblParameters.horizontalHeader().setDefaultSectionSize(250)
self.tblParameters.horizontalHeader().setMinimumSectionSize(150)
self.tblParameters.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents)
self.tblParameters.verticalHeader().setResizeMode(QHeaderView.ResizeToContents)
self.tblParameters.horizontalHeader().setStretchLastSection(True)



def getWidgetFromParameter(self, param, row, col):
if isinstance(param, (ParameterRaster, ParameterVector, ParameterTable,
ParameterMultipleInput)):

0 comments on commit b4edf8a

Please sign in to comment.
You can’t perform that action at this time.