Results 1 to 3 of 3

Thread: How to add network computers into QFileDialog?

  1. #1
    Join Date
    Jan 2012
    Posts
    15
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default How to add network computers into QFileDialog?

    Hello!

    My QFileDialog object is for selecting folders. I do like this:

    Qt Code:
    1. QFileDialog flg(this, "Choose folder", QDir::homePath(), QString());
    2. flg.setFileMode(QFileDialog::Directory);
    3. flg.setOption(QFileDialog::ShowDirsOnly);
    4. if(flg.exec())
    5. {
    6. QStringList folders = flg.selectedFiles();
    7. ...
    To copy to clipboard, switch view to plain text mode 

    I want the file dialog to display my network places (computers that are in my network) in the left panel (near My Computer, My Documents and etc). I know I can use the static method getExistingDirectory() but in that way I can choose only one folder but I need a multiselection. So what should I do? Would you help me, please?
    Last edited by tehman; 21st June 2012 at 10:48.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to add network computers into QFileDialog?

    AFAIR, non-native dialog will not show network drives.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2012
    Posts
    15
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Re: How to add network computers into QFileDialog?

    Thank you for the reply. I think you are right. I refused from folders multiselection and now I use the static method getExistingDirectory which displays my network places but allows to choose only one folder.

Similar Threads

  1. Replies: 1
    Last Post: 6th March 2011, 14:44
  2. My Network Places in QFileDialog
    By AlHadr in forum Qt Programming
    Replies: 2
    Last Post: 9th November 2009, 16:38
  3. QT app on several win32 computers
    By mmickey in forum Qt Programming
    Replies: 1
    Last Post: 12th June 2009, 12:42
  4. QPushButton's text cut off on other computers
    By vonCZ in forum Qt Programming
    Replies: 2
    Last Post: 11th November 2008, 20:41
  5. Replies: 4
    Last Post: 12th April 2007, 20:52

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.