Results 1 to 5 of 5

Thread: QFile dialog, native view

  1. #1
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    691
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QFile dialog, native view

    Hi I would like to open a dialog to allow the user to choose a directory.
    At the moment I only wrote these line of code:

    Qt Code:
    1. void ConfigDlg::chooseSrcDir()
    2. {
    3. QFileDialog dialog(this);
    4. dialog.setFileMode( QFileDialog::DirectoryOnly );
    5.  
    6. dialog.exec();
    7. }
    To copy to clipboard, switch view to plain text mode 

    where ConfigDlg inherits from QDialod so:
    Qt Code:
    1. #ifndef __CONFIGDLG_H__
    2. #define __CONFIGDLG_H__
    3.  
    4. #include "GeneratedFiles/ui_configDlg.h"
    5. #include <QDialog>
    6.  
    7. class ConfigDlg : public QDialog
    8. {
    9. Q_OBJECT
    10.  
    11. public:
    12. ConfigDlg( QWidget *parent );
    13. virtual ~ConfigDlg();
    14.  
    15. private slots:
    16. void chooseSrcDir();
    17. void chooseOutputDir();
    18.  
    19. protected:
    20.  
    21. private:
    22. Ui::configDlg ui;
    23. };
    24.  
    25. #endif __CONFIGDLG_H__.
    To copy to clipboard, switch view to plain text mode 
    The exec doesn't display the dialog in native mode, but in Qt mode, and this is extremely slow on my machine.
    How can I force Qt to show the dialog in native mode?

    Best Regards,
    Frank
    Franco Amato

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QFile dialog, native view


  3. #3
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    691
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFile dialog, native view

    Quote Originally Posted by Lykurg View Post
    I don't know why the dialogs in Qt mode are slower than native mode
    Franco Amato

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QFile dialog, native view

    Quote Originally Posted by franco.amato View Post
    I don't know why the dialogs in Qt mode are slower than native mode
    me neither but did you get a nativ dialog throug the mentiond static version? Because you normally should.

  5. #5
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    691
    Thanks
    59
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFile dialog, native view

    Quote Originally Posted by Lykurg View Post
    me neither but did you get a nativ dialog throug the mentiond static version? Because you normally should.
    Yes I got it.
    Thank you very much
    Franco Amato

Similar Threads

  1. Canceling the getOpenFileName native dialog
    By mclark in forum Qt Programming
    Replies: 1
    Last Post: 14th August 2009, 23:59
  2. Native QFileDialog
    By bgougeon in forum Qt Programming
    Replies: 3
    Last Post: 6th June 2009, 02:33
  3. Replies: 2
    Last Post: 4th February 2008, 12:00
  4. MS Sql native driver??
    By LordQt in forum Qt Programming
    Replies: 4
    Last Post: 9th October 2007, 14:41
  5. Can Native Api be Used?
    By iGoo in forum Qt Programming
    Replies: 1
    Last Post: 25th May 2006, 12:44

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.