15 Reputation Points
Ranked #2K
- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
100% Quality Score
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
0 Endorsements
Ranked #107.49K
MyMainWindow::createUI() { label = new QLabel("foo"); button = new QPushButton("Browse"); connect(button, SIGNAL(clicked()), SLOT(browse())); layout = new QHorizontalLayout(); layout->addWidget(label); layout->addWidget(button); setLayout(layout); } void MyMainWindow::browse() { QString directory = QFileDialog::getExistingDirectory(this, tr("Find Files"), QDir::currentPath()); if (!directory.isEmpty()) { if (directoryComboBox->findText(directory) == -1) directoryComboBox->addItem(directory); directoryComboBox->setCurrentIndex(directoryComboBox->findText(directory)); } } MyMainWindow::createUI() { label = new QLabel("foo"); button = … |