Skip to content

A modern cross-platform file system explorer with built-in text editor, built with Qt Quick/QML.

License

sile350/QtFileSystemExplorer

Repository files navigation

File System Explorer

Qt Version License Platform

A modern cross-platform file system explorer with built-in text editor, built with Qt Quick/QML.

Screenshot

✨ Features

  • File Explorer - Navigate the file system with tree view structure
  • Text Editor - Built-in editor with line number highlighting
  • Modern UI - Responsive interface with custom Qt Quick components
  • Frameless Window - Modern frameless design with custom window controls
  • Text Editing - Full support for Cut/Copy/Paste/Undo operations
  • Display Settings:
    • Toggle line numbers display (Ctrl+L)
    • Font scaling (Ctrl+Plus/Ctrl+Minus)
    • Toggle between full and short file path
  • Keyboard Shortcuts - Full support for standard key combinations

πŸ–₯️ Supported Platforms

  • Windows
  • macOS
  • Linux

Note: Android and iOS are not supported

πŸ“‹ Requirements

  • Qt 6.8 or newer
  • CMake 3.16 or newer (for CMake build)
  • qmake (for qmake build, optional)
  • Compiler with C++17 support or newer

Qt Dependencies

  • Qt6::Core
  • Qt6::Gui
  • Qt6::Quick
  • Qt6::QuickControls2
  • Qt6::Svg

πŸš€ Building and Installation

Building with CMake (recommended)

# Clone the repository
git clone https://github.com/sile350/QtFileSystemExplorer.git
cd filesystemexplorer

# Create build directory
mkdir build
cd build

# Configure the project
cmake ..

# Build the project
cmake --build .

# Optional: install the application
cmake --install .

Building with qmake

# Clone the repository
git clone https://github.com/sile350/QtFileSystemExplorer.git
cd filesystemexplorer

# Create Makefile
qmake filesystemexplorer.pro

# Build the project
make

# Run the application
./filesystemexplorer

Building with Qt Creator

  1. Open Qt Creator
  2. Select File β†’ Open File or Project
  3. Open the CMakeLists.txt or filesystemexplorer.pro file
  4. Configure the project with the desired Qt Kit
  5. Click Build β†’ Build Project

πŸ“– Usage

Running the Application

# Run with home directory (default)
./filesystemexplorer

# Run with specified initial directory
./filesystemexplorer /path/to/directory

Keyboard Shortcuts

Action Key Combination
Increase Font Ctrl++ (or Ctrl+=)
Decrease Font Ctrl+-
Toggle Line Numbers Ctrl+L
Cut Ctrl+X
Copy Ctrl+C
Paste Ctrl+V
Select All Ctrl+A
Undo Ctrl+Z
Exit Ctrl+Q

Main Functions

  • File Navigation: Use the sidebar with folder icon to browse the file system
  • File Viewing: Click on any text file to view its contents
  • Editing: You can edit file contents in the editor (changes are not saved to disk)
  • Resizing: Drag the dividers between panels to adjust sizes

πŸ—οΈ Project Architecture

filesystemexplorer/
β”œβ”€β”€ main.cpp                 # Application entry point
β”œβ”€β”€ Main.qml                 # Main QML component
β”œβ”€β”€ filesystemmodel.h/cpp    # File system model
β”œβ”€β”€ linenumbermodel.h/cpp    # Line number model
β”œβ”€β”€ qml/                     # QML components
β”‚   β”œβ”€β”€ Colors.qml          # Color scheme (singleton)
β”‚   β”œβ”€β”€ Editor.qml          # Text editor
β”‚   β”œβ”€β”€ FileSystemView.qml  # File system view
β”‚   β”œβ”€β”€ Sidebar.qml         # Navigation sidebar
β”‚   β”œβ”€β”€ MyMenu.qml          # Menu component
β”‚   β”œβ”€β”€ MyMenuBar.qml       # Menu bar
β”‚   β”œβ”€β”€ ResizeButton.qml    # Window resize button
β”‚   β”œβ”€β”€ WindowDragHandler.qml # Window drag handler
β”‚   └── About.qml           # About dialog
β”œβ”€β”€ icons/                   # SVG icons
β”œβ”€β”€ doc/                     # Documentation
β”œβ”€β”€ CMakeLists.txt          # CMake configuration
└── filesystemexplorer.pro  # qmake configuration

🎨 Key Components

FileSystemModel

Inherits from QFileSystemModel, provides:

  • File reading with MIME type checking
  • Current line number detection in editor
  • Root directory management
  • File size limitation (up to 2 MB)

LineNumberModel

Efficient model for displaying line numbers in the editor:

  • Dynamic row addition/removal
  • Optimized performance for large files

QML Components

  • Custom Controls - Styled menu and button components
  • Responsive Layout - Using SplitView for resizable panels
  • Frameless Window - Custom drag handler for window movement

🀝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a branch for your feature (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is distributed under the BSD-3-Clause license. See the LICENSE file for details.

Based on the example from Qt Company Ltd.

πŸ› Known Limitations

  • Maximum readable file size: 2 MB
  • Only text files are supported (determined by MIME type)
  • File editing occurs only in memory (not saved to disk)

πŸ“š Documentation

For Users

For Developers

Additional

If you have questions or suggestions, please create an issue in the repository.

πŸ™ Acknowledgments

  • Qt Company Ltd. for the original example
  • Qt community for excellent documentation and support
  • All project contributors

Note: This is an educational project demonstrating Qt Quick/QML capabilities for creating modern desktop applications.

⭐ Support the Project

If this project was useful to you, give it a ⭐ on GitHub! It motivates us to develop the project further.

About

A modern cross-platform file system explorer with built-in text editor, built with Qt Quick/QML.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published