Home > Back-end >  QT, QFileDialog selected folder after click ok, and how to open the folder
QT, QFileDialog selected folder after click ok, and how to open the folder

Time:03-02

Dear bosses, I meet a problem now, is to use QFileDialog: : getExistingDirectory selected folder click ok then returned directly I don't want to let him return but click ok right now into the folder directory is the younger brother do? Thank extremely!!

CodePudding user response:

Don't order determined

CodePudding user response:

Well but we demand side is to want to do so

CodePudding user response:

reference 1/f, the truth is right or wrong response:
don't points determine

Do you have any good way to big demand on our side is such

CodePudding user response:

Point to determine does not return, so what do you think operation to return?

CodePudding user response:

references in 4th floor, the truth is more important than right or wrong response:
determined not to return, so what do you think operation to return?

Oh I mean if the selected is a folder into the selected layer can yao

CodePudding user response:

references in 4th floor, the truth is more important than right or wrong response:
determined not to return, so what do you think operation to return?

Click ok if without the selected file or folder is returned

CodePudding user response:

I feel you didn't quite understand what is to select the folder

CodePudding user response:

refer to 7th floor truth is right or wrong response:
I feel you don't quite understand what is to select the folder

Embarrassed bosses I dishes too much I want to achieve is effect but I don't like this

CodePudding user response:

That controls is an operating interface to you, let you get to get a file, specific processing, also need you to write

CodePudding user response:

Refer to this, is not this meaning: https://blog.csdn.net/baidu_32867469/article/details/50824427

CodePudding user response:

https://blog.csdn.net/suese/article/details/19809645? Utm_medium=distribute. Pc_relevant. None - task - blog - baidujs_utm_term - 3 & amp; SPM=1001.2101.3001.4242

CodePudding user response:

11 references QZJHJXJ response:
https://blog.csdn.net/suese/article/details/19809645? Utm_medium=distribute. Pc_relevant. None - task - blog - baidujs_utm_term - 3 & amp; SPM=1001.2101.3001.4242

Sorry bosses may I have a problem is what I want to achieve expression of the style is in QFileDialog cursor if it is selected folder click ok then enter the selected directory in QFileDialog rather than directly to return me the express is too waste forgive me forgive me

CodePudding user response:

Reference:
 FileDialog://function: getExistingDirectory () open an existing folder code is as follows: 

QString directory=QFileDialog: : getExistingDirectory (
This,
Tr (" select the folder "),
FileDirLEdt - & gt; The text (),
QFileDialog: : ShowDirsOnly);
if (! Directory. IsEmpty ())
{
FileDirLEdt - & gt; SetText (directory);
QDebug () & lt; }