qt - How to resize QTableWidget on Widget by dragging its corner -


Like the following screen shot I want to resize QTableWidget by dragging the bottom right corner. I How to do? Here's my code. PySide.QtGui Import QApplication, QWidget, QTableWidget Week = ["Mon", "Sue", "Withdrawal", "Piceide." From

  thr "," fri "," sat "," sun "] ap = QApplication ([]) mainWidget = QWidget () tableWidget = QTableWidget (mainWidget) tableWidget.setRowCount (3) Table Widget.setColumnCount (7) tableWidget.setHorizontalHeaderLabels (Week) MainWidget.show ()  

Thank you.

One way to do this is by using QSizeGrip in a layout inside the table widget:

  tableWidget-> Set Window Flex (QT :: SubVando ); QSizeGrip * sizeGrip = new QSizeGrip (tableWidget); QGridLayout * Layout = New QGridLayout (tableWidget); Layout-> Ad Widgets (Size Grid, 0,0,1,1, Qt :: AllBlueMt | QT :: AlienGuRight);  

QSizeGrip The class provides a resize handle to resize the top-level window when you set the widget's flag QT :: subvando , then the user can use it to hold the shape size Can change


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -