Results 1 to 2 of 2

Thread: How to show the file system as a Windows user expects to see it

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

    Default How to show the file system as a Windows user expects to see it

    I’m new to Qt. I’ve run into something that makes so little sense, I suspect I’m just missing something obvious. I’m using Windows XP.

    In my application I want to present an “Explorer” control for file selection. (A QFileDialog would be too clumsy, because the user will be selecting and dragging various files while running the program.) Connecting a QFileSystemModel to a QTreeView almost works, but there’s a problem.

    The control shows the disk drives at the top level (with My Computer as the implied, unseen root). No Windows program would ever present an Explorer view this way — half the Windows users out there probably couldn’t even find their desktops and documents starting from the root of the C:\ drive.

    Windows always displays the Desktop as the top-level entry, with My Documents and My Computer as the first two entries beneath it.

    How do I get this ubiquitous Windows Explorer tree presentation under Qt4 (at least when running under Windows — I have no idea how it should appear on other systems, but hopefully it would appear in each consistently with the way that system normally presents its file system), instead of the drives-at-top presentation, which makes perfect sense to geeks but would be incomprehensible to the average Windows user?

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to show the file system as a Windows user expects to see it

    Look into QDesktopServices.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

Similar Threads

  1. Replies: 2
    Last Post: 27th October 2007, 18:16
  2. file renaming on windows
    By jdd81 in forum Qt Programming
    Replies: 9
    Last Post: 2nd October 2007, 19:41
  3. Draging a non-existing file to the Windows Desktop
    By klaus1111 in forum Qt Programming
    Replies: 13
    Last Post: 20th September 2007, 11:47
  4. Replies: 3
    Last Post: 4th September 2007, 14:40

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.