Play-/Source/ui_qt/DebugSupport/QtDialogListWidget.cpp

34 lines
581 B
C++
Raw Normal View History

#include "QtDialogListWidget.h"
#include "ui_QtDialogListWidget.h"
QtDialogListWidget::QtDialogListWidget(QWidget *parent) :
QDialog(parent),
ui(new Ui::QtDialogListWidget)
{
ui->setupUi(this);
}
QtDialogListWidget::~QtDialogListWidget()
{
delete ui;
}
void QtDialogListWidget::addItem(std::string item)
{
ui->listWidget->addItem(item.c_str());
}
std::string QtDialogListWidget::getResult()
{
return results;
}
void QtDialogListWidget::on_buttonBox_accepted()
{
2019-12-10 13:20:51 +00:00
auto item = ui->listWidget->currentItem();
if(item)
{
results = item->text().toStdString();
}
}