简体   繁体   中英

QFileDialog doesn't work with tags in OSX and Qt 5.7

I need fileDialog to work properly with tags. On OSX, when I try to click on tag - this code removes all files from file dialog, so I can't pick them.

Looks like I found solution Option::DontResolveSymlinks but it doesn't work either.

Update: if filter is "Any (\\*.\\*)" it shows folders, in other cases it doesn't. Like it disables files to be chosen - I already came up with workaround, but hope there is a solution.

QStringList filenames = QFileDialog::getOpenFileNames(nullptr, 
                                                      caption,
                                                      lastDirPath,
                                                      filter,
                                                      nullptr,
                                                      QFileDialog::Option::DontResolveSymlinks);

Update: added screen to describe what "tag" is 标签示例

I have found a resolve for the mac file open hang, based on the previous answer.

QStringList filenames = QFileDialog::getOpenFileNames(nullptr, 
                                                      caption,
                                                      lastDirPath,
                                                      filter,
                                                      nullptr,
                                                      QFileDialog::Option::DontUseNativeDialog)

The mac file dialog is not used, it looks more UNIX like, but it now works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM