daily pastebin goal
64%
SHARE
TWEET

QFile diallog

a guest May 15th, 2015 9 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3.  
  4. MainWindow::MainWindow(QWidget *parent) :
  5.     QMainWindow(parent),
  6.     ui(new Ui::MainWindow)
  7. {    
  8.     ui->setupUi(this);
  9.     wsk = NULL;
  10. }
  11.  
  12. MainWindow::~MainWindow()
  13. {
  14.     delete ui;
  15. }
  16.  
  17. void MainWindow::on_pushButton_clicked()
  18. {
  19.     wsk = new QFileDialog(this);
  20.     wsk->setFileMode(QFileDialog::ExistingFiles);
  21.     wsk->setNameFilter(tr("Images (*.jpeg *.jpg)"));
  22.     wsk->show();
  23. }
  24.  
  25. void MainWindow::on_pushButton_2_clicked()
  26. {
  27.     wsk->close();
  28.     delete wsk;
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top