private void createImagesGroupBox() { imagesGroupBox = new QGroupBox(tr("Images")); imagesTable = new QTableWidget(); imagesTable.setSelectionMode(QAbstractItemView.SelectionMode.NoSelection); imagesTable.setItemDelegate(new ImageDelegate(this)); List<String> labels = new LinkedList<String>(); labels.add(tr("Image")); labels.add(tr("Mode")); labels.add(tr("State")); imagesTable.horizontalHeader().setDefaultSectionSize(90); imagesTable.setColumnCount(3); imagesTable.setHorizontalHeaderLabels(labels); imagesTable.horizontalHeader().setResizeMode(0, QHeaderView.ResizeMode.Stretch); imagesTable.horizontalHeader().setResizeMode(1, QHeaderView.ResizeMode.Fixed); imagesTable.horizontalHeader().setResizeMode(2, QHeaderView.ResizeMode.Fixed); imagesTable.verticalHeader().hide(); imagesTable.itemChanged.connect(this, "changeIcon()"); QVBoxLayout layout = new QVBoxLayout(); layout.addWidget(imagesTable); imagesGroupBox.setLayout(layout); }
private void createPreviewGroupBox() { previewGroupBox = new QGroupBox(tr("Preview")); previewArea = new IconPreviewArea(); QVBoxLayout layout = new QVBoxLayout(); layout.addWidget(previewArea); previewGroupBox.setLayout(layout); }
// ! [0] public window(QWidget parent) { super(parent); // ! [0] QLabel textLabel = new QLabel(tr("Data:"), this); textBrowser = new QTextBrowser(this); QLabel mimeTypeLabel = new QLabel(tr("MIME types:"), this); mimeTypeCombo = new QComboBox(this); QVBoxLayout layout = new QVBoxLayout(this); layout.addWidget(textLabel); layout.addWidget(textBrowser); layout.addWidget(mimeTypeLabel); layout.addWidget(mimeTypeCombo); // ! [1] setAcceptDrops(true); // ! [1] setWindowTitle(tr("Drop Events")); // ! [2] }
public void setupUi(QWidget AnalisisForm) { AnalisisForm.setObjectName("AnalisisForm"); AnalisisForm.resize(new QSize(568, 351).expandedTo(AnalisisForm.minimumSizeHint())); gridLayout_3 = new QGridLayout(AnalisisForm); gridLayout_3.setObjectName("gridLayout_3"); horizontalLayout = new QHBoxLayout(); horizontalLayout.setObjectName("horizontalLayout"); tableWidget = new QTableWidget(AnalisisForm); tableWidget.setObjectName("tableWidget"); horizontalLayout.addWidget(tableWidget); verticalLayout_2 = new QVBoxLayout(); verticalLayout_2.setObjectName("verticalLayout_2"); groupBox = new QGroupBox(AnalisisForm); groupBox.setObjectName("groupBox"); groupBox.setMinimumSize(new QSize(0, 0)); gridLayout = new QGridLayout(groupBox); gridLayout.setObjectName("gridLayout"); verticalLayout = new QVBoxLayout(); verticalLayout.setObjectName("verticalLayout"); pasosButton = new QPushButton(groupBox); pasosButton.setObjectName("pasosButton"); verticalLayout.addWidget(pasosButton); completoButton = new QPushButton(groupBox); completoButton.setObjectName("completoButton"); verticalLayout.addWidget(completoButton); gridLayout.addLayout(verticalLayout, 0, 0, 1, 1); verticalLayout_2.addWidget(groupBox); groupBox_2 = new QGroupBox(AnalisisForm); groupBox_2.setObjectName("groupBox_2"); groupBox_2.setMaximumSize(new QSize(16777215, 80)); gridLayout_2 = new QGridLayout(groupBox_2); gridLayout_2.setObjectName("gridLayout_2"); cerrarButton = new QPushButton(groupBox_2); cerrarButton.setObjectName("cerrarButton"); gridLayout_2.addWidget(cerrarButton, 0, 0, 1, 1); verticalLayout_2.addWidget(groupBox_2); horizontalLayout.addLayout(verticalLayout_2); gridLayout_3.addLayout(horizontalLayout, 0, 0, 1, 1); retranslateUi(AnalisisForm); cerrarButton.clicked.connect(AnalisisForm, "close()"); AnalisisForm.connectSlotsByName(); } // setupUi