Last active
January 1, 2016 15:19
-
-
Save yamato8/8163300 to your computer and use it in GitHub Desktop.
Combo Box の使い方:Qt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mainwindow.h" | |
#include "ui_mainwindow.h" | |
#include <QDebug> | |
MainWindow::MainWindow(QWidget *parent) : | |
QMainWindow(parent), | |
ui(new Ui::MainWindow) | |
{ | |
ui->setupUi(this); | |
} | |
MainWindow::~MainWindow() | |
{ | |
delete ui; | |
} | |
void MainWindow::on_comboBox_currentIndexChanged(const QString &arg1) | |
{ | |
qDebug() << "選択されたアイテム:" << arg1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MAINWINDOW_H | |
#define MAINWINDOW_H | |
#include <QMainWindow> | |
namespace Ui { | |
class MainWindow; | |
} | |
class MainWindow : public QMainWindow | |
{ | |
Q_OBJECT | |
public: | |
explicit MainWindow(QWidget *parent = 0); | |
~MainWindow(); | |
private slots: | |
void on_comboBox_currentIndexChanged(const QString &arg1); | |
private: | |
Ui::MainWindow *ui; | |
}; | |
#endif // MAINWINDOW_H |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment