1 Star 0 Fork 2

pandygui/RepRaptor

forked from morixinguan/RepRaptor 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
sdwindow.cpp 746 Bytes
一键复制 编辑 原始数据 按行查看 历史
NeoTheFox 提交于 2015-03-27 02:12 +08:00 . Fixed crash in SD window
#include "sdwindow.h"
#include "ui_sdwindow.h"
SDWindow::SDWindow(QStringList files, QWidget *parent) :
QDialog(parent),
ui(new Ui::SDWindow)
{
ui->setupUi(this);
ui->fileslist->setSelectionMode(QListView::SingleSelection);
if(!files.isEmpty())
{
ui->fileslist->addItems(files);
ui->fileslist->setCurrentItem(ui->fileslist->itemAt(0,0));
}
}
SDWindow::~SDWindow()
{
delete ui;
}
void SDWindow::on_buttonBox_accepted()
{
if(ui->fileslist->count() > 0) emit fileSelected(ui->fileslist->currentItem()->text());
}
void SDWindow::on_fileslist_doubleClicked(const QModelIndex &)
{
if(ui->fileslist->count() > 0) emit fileSelected(ui->fileslist->currentItem()->text());
this->close();
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pandygui/RepRaptor.git
git@gitee.com:pandygui/RepRaptor.git
pandygui
RepRaptor
RepRaptor
master

搜索帮助