2013年8月2日

Qt snippet — 打开文件&保存文件

摘要: 打开文件: 1 void Notepad::on_actionOpen_triggered() 2 { 3 QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), QString(), 4 tr("Text Files (*.txt);;C++ Files (*.cpp *.h)")); 5 6 if (!fileName.isEmpty()) { 7 QFile file(fileName); 8 if (!f... 阅读全文

posted @ 2013-08-02 21:16 铁树银花 阅读(1537) 评论(0) 推荐(0) 编辑

导航