This code equally stretches each column so that they fit the table’s width.
table->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
Docs:
- QHeaderView::setSectionResizeMode
- See resize modes here.
More Related Contents:
- Decompile qt exe [closed]
- Qt Linker Error: “undefined reference to vtable” [duplicate]
- How to link opencv in QtCreator and use Qt library
- How to build Qt for Visual Studio 2010
- How to redirect qDebug, qWarning, qCritical etc output?
- Qt: resizing a QLabel containing a QPixmap while keeping its aspect ratio
- cv::Mat to QImage and back
- What does the “lock” instruction mean in x86 assembly?
- what does __declspec(dllimport) really mean?
- How do I create a simple Qt console application in C++?
- QObject Multiple Inheritance
- Beyond Stack Sampling: C++ Profilers
- Configuring the GCC compiler switches in Qt, QtCreator, and QMake
- Distinguish between single and double click events in Qt
- Open QFile for appending
- QT : Templated Q_OBJECT class
- Error: Could not resolve SDK path for ‘macosx10.8’
- Where in Qt Creator do I pass arguments to a compiler?
- QDialog exec() and getting result value
- How can I use C++14 features when building qmake projects?
- How to Compress Slot Calls When Using Queued Connection in Qt?
- Starting QTimer In A QThread
- What are consequences of forcing QObject as a parent of QWidget?
- QTableView printing
- Can I use Qt without qmake or Qt Creator?
- How to “Reveal in Finder” or “Show in Explorer” with Qt
- Qt equivalent of PathAppend?
- Making my own photo-mosaic app with Qt using C++
- Display QImage with QtGui
- How to draw a point (on mouseclick) on a QGraphicsScene?