Results 1 to 9 of 9

Thread: Customizing QFileDialog

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2011
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Customizing QFileDialog

    Well, this works only partially. Namely, e.g. I wanna stay in the directory /tmp. And click to Up-icon in the QFileDialog window. This generates the signal directoryEntered(const QString), which I can catch up and move back to /tmp. However, the path "/" remains in the history. And then backButton from the QFileDialogPrivate can be used and does not generate the signal. In this way, I can traverse the entire /-tree.

    Would appreciate any comments

    P.S. clearing histroy also didn't help.

    P.P.S changeEvent also doesn't react to back- and forward-buttons. However, it does work on go-up-button
    Last edited by UrfinJuice; 22nd July 2011 at 09:59.

  2. #2
    Join Date
    Mar 2011
    Posts
    7
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Customizing QFileDialog

    Ok, just to tell how I solved the problem:

    In the file qfiledialog.cpp in functions
    void QFileDialogPrivate::_q_navigateForward()
    and
    void QFileDialogPrivate::_q_navigateBackward()
    after
    q->setDirectory(nextHistory);
    and
    q->setDirectory(previousHistory);

    I added
    emit q->directoryEntered(nextHistory);
    and
    emit q->directoryEntered(previousHistory);
    respectively.

    Recompile -> runs

    However, I'm not sure, if it's a bug or a feature

Similar Threads

  1. QFileDialog - will be closed after selecting a file
    By skyperhh in forum Qt Programming
    Replies: 1
    Last Post: 18th October 2009, 16:49
  2. subclass of QFileDialog
    By afail in forum Qt Programming
    Replies: 1
    Last Post: 18th May 2009, 17:09
  3. QFileDialog in Qt designer
    By tpf80 in forum Qt Tools
    Replies: 1
    Last Post: 17th May 2007, 00:41
  4. QFileDialog Mac / PC
    By hey in forum Qt Programming
    Replies: 3
    Last Post: 26th April 2007, 18:23
  5. copy file/s from QFileDialog
    By raphaelf in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 14:26

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