title: Assign different widths to columns of a QTableWidget
body: <p>I'm developing a small interface in <strong>pyqt5</strong> from <strong>QT Designer</strong>, this includes a <strong>QTableWidget</strong> but I want to <strong>assign different widths to the columns</strong>, I have found topics that talk about the same but I don't know exactly where to insert the code they provide, I don't know if it's because of the version, I'm quite new in <strong>QT Designer</strong>.</p>
  
  <p><strong>I leave the questions I mention for what it's worth.</strong></p>
  
  <p><a href="https://stackoverflow.com/questions/8569798/pyqthow-do-i-set-different-header-sizes-for-individual-headers">PyQt:How do i set different header sizes for individual headers?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/44978217/pyqt-set-column-widths">PyQt Set column widths</a></p>
  
  <p><strong>The structure of my files is as follows:</strong></p>
  
  <blockquote>
    <p><strong>app.py:</strong> Stores the functionalities of the application</p>
    
    <p><strong>SGS.py:</strong> The code that is generated after converting the <strong>.ui</strong> file to <strong>.py</strong></p>
    
    <p><strong>SGS.ui</strong></p>
  </blockquote>
  
  <p>I leave the <strong>SGS.py part where the table headers are generated</strong> for what it's worth.</p>
  
  <pre><code>item = self.TableDocs.horizontalHeaderItem(0)
  item.setText(_translate("MainWindow", "IDsystem"))
  item = self.TableDocs.horizontalHeaderItem(2)
  item.setText(_translate("MainWindow", "IDpeople"))
  item = self.TableDocs.horizontalHeaderItem(3)
  item.setText(_translate("MainWindow", "Work"))
  item = self.TableDocs.horizontalHeaderItem(4)
  item.setText(_translate("MainWindow", "Hours"))
  </code></pre>
  
  <p><strong>I also leave the code with which I fill the table</strong></p>
  
  <pre><code>result = Cur.execute("SELECT idsystem,IDpeople,work,hours FROM workers")
  self.TableDocs.setRowCount(0)
  
  for row_number, row_data in enumerate(result):
      self.TableDocs.insertRow(row_number)
      for column_number, data in enumerate(row_data):
          self.TableDocs.setItem(row_number, column_number, QtWidgets.QTableWidgetItem(str(data)))
  </code></pre>