OK - now I forgot to also post the derivative file of the pyuic4. After I had designed the layout with QT Designer, I created the following tstMain.py file via pyuic4:

Qt Code:
  1. # -*- coding: utf-8 -*-
  2.  
  3. # Form implementation generated from reading ui file 'tstMain.ui'
  4. #
  5. # Created: Sun Sep 30 21:39:12 2007
  6. # by: PyQt4 UI code generator 4.3
  7. #
  8. # WARNING! All changes made in this file will be lost!
  9.  
  10. from PyQt4 import QtCore, QtGui
  11.  
  12. class Ui_tstMain(object):
  13. def setupUi(self, tstMain):
  14. tstMain.setObjectName("tstMain")
  15. tstMain.setEnabled(True)
  16. tstMain.resize(QtCore.QSize(QtCore.QRect(0,0,951,394).size()).expandedTo(tstMain.minimumSizeHint()))
  17.  
  18. sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred,QtGui.QSizePolicy.Preferred)
  19. sizePolicy.setHorizontalStretch(0)
  20. sizePolicy.setVerticalStretch(0)
  21. sizePolicy.setHeightForWidth(tstMain.sizePolicy().hasHeightForWidth())
  22. tstMain.setSizePolicy(sizePolicy)
  23. tstMain.setLayoutDirection(QtCore.Qt.LeftToRight)
  24.  
  25. self.centralwidget = QtGui.QWidget(tstMain)
  26. self.centralwidget.setObjectName("centralwidget")
  27.  
  28. self.tbl_OpenFile = QtGui.QTableWidget(self.centralwidget)
  29. self.tbl_OpenFile.setGeometry(QtCore.QRect(110,80,811,121))
  30.  
  31. sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Expanding)
  32. sizePolicy.setHorizontalStretch(0)
  33. sizePolicy.setVerticalStretch(0)
  34. sizePolicy.setHeightForWidth(self.tbl_OpenFile.sizePolicy().hasHeightForWidth())
  35. self.tbl_OpenFile.setSizePolicy(sizePolicy)
  36. self.tbl_OpenFile.setMaximumSize(QtCore.QSize(16777215,16777215))
  37. self.tbl_OpenFile.setLineWidth(1)
  38. self.tbl_OpenFile.setObjectName("tbl_OpenFile")
  39.  
  40. self.btn_OpenFile = QtGui.QPushButton(self.centralwidget)
  41. self.btn_OpenFile.setGeometry(QtCore.QRect(20,80,81,23))
  42. self.btn_OpenFile.setObjectName("btn_OpenFile")
  43.  
  44. self.tbl_ListShow = QtGui.QTableWidget(self.centralwidget)
  45. self.tbl_ListShow.setGeometry(QtCore.QRect(20,260,901,81))
  46. self.tbl_ListShow.setObjectName("tbl_ListShow")
  47.  
  48. self.btn_SetWorkingDir = QtGui.QPushButton(self.centralwidget)
  49. self.btn_SetWorkingDir.setGeometry(QtCore.QRect(20,50,82,23))
  50. self.btn_SetWorkingDir.setObjectName("btn_SetWorkingDir")
  51.  
  52. self.lnEdt_WorkingDir = QtGui.QLineEdit(self.centralwidget)
  53. self.lnEdt_WorkingDir.setEnabled(True)
  54. self.lnEdt_WorkingDir.setGeometry(QtCore.QRect(110,50,811,20))
  55. self.lnEdt_WorkingDir.setAutoFillBackground(False)
  56. self.lnEdt_WorkingDir.setReadOnly(True)
  57. self.lnEdt_WorkingDir.setObjectName("lnEdt_WorkingDir")
  58.  
  59. self.btn_ListShow = QtGui.QPushButton(self.centralwidget)
  60. self.btn_ListShow.setGeometry(QtCore.QRect(730,230,191,23))
  61. self.btn_ListShow.setObjectName("btn_ListShow")
  62. tstMain.setCentralWidget(self.centralwidget)
  63.  
  64. self.menubar = QtGui.QMenuBar(tstMain)
  65. self.menubar.setGeometry(QtCore.QRect(0,0,951,21))
  66. self.menubar.setObjectName("menubar")
  67. tstMain.setMenuBar(self.menubar)
  68.  
  69. self.statusbar = QtGui.QStatusBar(tstMain)
  70. self.statusbar.setObjectName("statusbar")
  71. tstMain.setStatusBar(self.statusbar)
  72.  
  73. self.retranslateUi(tstMain)
  74. QtCore.QMetaObject.connectSlotsByName(tstMain)
  75.  
  76. def retranslateUi(self, tstMain):
  77. tstMain.setWindowTitle(QtGui.QApplication.translate("tstMain", "My Test Application", None, QtGui.QApplication.UnicodeUTF8))
  78. self.tbl_OpenFile.setRowCount(0)
  79. self.tbl_OpenFile.clear()
  80. self.tbl_OpenFile.setColumnCount(0)
  81. self.tbl_OpenFile.setRowCount(0)
  82. self.btn_OpenFile.setText(QtGui.QApplication.translate("tstMain", "Open File", None, QtGui.QApplication.UnicodeUTF8))
  83. self.tbl_ListShow.clear()
  84. self.tbl_ListShow.setColumnCount(0)
  85. self.tbl_ListShow.setRowCount(0)
  86. self.btn_SetWorkingDir.setText(QtGui.QApplication.translate("tstMain", "Set Working Dir", None, QtGui.QApplication.UnicodeUTF8))
  87. self.lnEdt_WorkingDir.setText(QtGui.QApplication.translate("tstMain", "Working Directory NOT yet set !", None, QtGui.QApplication.UnicodeUTF8))
  88. self.btn_ListShow.setText(QtGui.QApplication.translate("tstMain", "Show List", None, QtGui.QApplication.UnicodeUTF8))
To copy to clipboard, switch view to plain text mode 

OK - Once I run the main.py file I am presented with the option to load a file in the first QTableWidget and I do so. In this way, the first QTableWidget named tbl_OpenFile is full of numbers imported from the opened file.
I then try to select whole columns here and there clicking with the mouse on the headers of the table. And so it does - the columns are selected...

...but when I click on the button btn_ListShow responsible to transfer my selection to the last QTable Widget named tbl_ListShow, I get the aforementioned error.

Thanx again,
Thomas