Results 1 to 3 of 3

Thread: setViewMode issue of QFileDialog

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Nov 2009
    Posts
    129
    Thanks
    4
    Thanked 29 Times in 29 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: setViewMode issue of QFileDialog

    QFileDialog::getOpenFileName is a static function. As such, it’s not using the l_pFiledDlg instance you created, so the QFileDialog::setViewMode has no effect. I think this:
    Qt Code:
    1. QFileDialog l_pFiledDlg(this, tr("Open Files"), sPath, tr("All Files (*.*)"));
    2. QString sFilename1;
    3. l_pFiledDlg.setViewMode(QFileDialog::Detail);
    4. if (l_pFiledDlg.exec()) sFilename1 = l_pFiledDlg.selectedFiles()[0];
    To copy to clipboard, switch view to plain text mode 
    should be close to what you want (though I haven’t tested it, so typos or outright errors would not be surprising).

  2. The following user says thank you to Coises for this useful post:

    nikhilqt (18th January 2010)

Similar Threads

  1. QFileDialog issue
    By a_m_mukul in forum Qt Programming
    Replies: 2
    Last Post: 15th November 2007, 23:46
  2. QFileDialog Issue
    By vishal.chauhan in forum Qt Programming
    Replies: 2
    Last Post: 15th March 2007, 04:30
  3. QFileDialog Issue
    By vishal.chauhan in forum Qt Programming
    Replies: 1
    Last Post: 14th March 2007, 15:37
  4. QFileDialog Issue
    By vishal.chauhan in forum Qt Programming
    Replies: 2
    Last Post: 28th February 2007, 13:47
  5. [Qt4] need help with QFileDialog
    By patcito in forum Qt Programming
    Replies: 2
    Last Post: 7th January 2006, 18:00

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
  •  
Qt is a trademark of The Qt Company.