Advertisement
Guest User

Untitled

a guest
May 26th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. QString GuiEngine::GetCSVFileName(void)
  2. {
  3. QString prompt = "Open File";
  4.  
  5. return QFileDialog::getOpenFileName(NULL,
  6. prompt,
  7. "report.csv",
  8. tr("CSV files (*.csv)"),
  9. NULL,
  10. QFileDialog::DontUseNativeDialog);
  11. }
  12.  
  13. import QtQuick 2.1
  14. import QtQuick.Dialogs 1.0
  15.  
  16. FileDialog {
  17. id: fileDialog
  18. title: "Please choose a file"
  19. onAccepted: {
  20. console.log("You chose: " + fileDialog.fileUrls)
  21. Qt.quit()
  22. }
  23. onRejected: {
  24. console.log("Canceled")
  25. Qt.quit()
  26. }
  27. Component.onCompleted: visible = true
  28. }
  29.  
  30. ...module "QtQuick.Controls" is not installed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement