February 2019
Beginner
136 pages
3h 7m
English
The QGridLayout is used to arrange widgets by specifying the number of rows and columns that will be filled up by multiple widgets. A grid-like structure mimics a table in that it has rows and columns and widgets are inserted as cells where a row and column meet.
Create a new folder and, using of any editor, create a file named main.cpp:
#include <QApplication>#include <QPushButton>#include <QGridLayout>#include <QLineEdit>#include <QDateTimeEdit>#include <QSpinBox>#include <QComboBox>#include <QLabel>#include <QStringList>int main(int argc, char *argv[]){ QApplication app(argc, argv); QWidget *window = new QWidget; QLabel *nameLabel = new QLabel("Open Happiness"); QLineEdit *firstNameLineEdit= new QLineEdit; QLineEdit *lastNameLineEdit= ...Read now
Unlock full access