0

Hello can anyone tell me how can I open a specified folder in Qt?

Suppose in a lineEdit I define the folder path like

D:/MyFolder

Then how can i open this folder using push button? What should I use for that?

1
  • Do you mean opening a folder in the file explorer ?
    – alexisdm
    Aug 26, 2012 at 14:07

1 Answer 1

1

You can use:

QDesktopServices::openUrl(QUrl::fromLocalFile(yourFolderPath));

inside a slot connected to you button.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.