Works fine for me, I tried this- QDesktopServices::openUrl(QUrl::fromLocalFile("c:/Qt"));
and it opened up Windows Explorer with that directory. On Qt5.4.1 MSVC 2010 32bit. On Wed, Apr 8, 2015 at 2:51 PM, Felix morack <felixo...@gmail.com> wrote: > Hi, > > I am porting code from Qt4 to Qt5 and the behavior of > QDesktopServices::openUrl() seems to have changed. > > We want to open a folder/path in the default explorer shell, which was > done like so: > > QDesktopServices::openUrl(QUrl::fromLocalFile("c:/testdir/"); > > Even though it says "from local file" it would open the directory just > fine, and there are several forum entries online that recommend doing just > that. > > However, in Qt5 the same code fails silently at runtime due to it not > pointing to a valid file. The documentation has remained the same. > > > Was there a silent change in behavior? Is this a regression? What is the > recommended way to open a path in the default shell? > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > > -- Shantanu Tushar (UTC +0530) shantanu.io
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest