Giter VIP home page Giter VIP logo

pyqt-top-left-right-file-list-widget's Introduction

pyqt-top-left-right-file-list-widget

Simple PyQt widget which contains QListWidget and add, delete QPushButton to add and delete file in the list

Requirements

PyQt5 >= 5.8

Setup

python -m pip install pyqt-top-left-right-file-list-widget

Included packages

Detailed Description

  • Being able to add files to list, select multiple files on the list to delete, clear list.
  • Being able to drop the files to the list
  • Check the duplicated files' name
  • User can able to choose the option to show files' name as absolute name or base name with "Show file name only" checkbox.
  • setLabel(text: str) - Set the label at the left side.
  • setExtensions(ext_lst: list) - Define the specific extensions to add.
  • setDuplicateEnabled(f: bool) - Allow to add duplicate name to list.
  • isDuplicateEnabled() -> bool

Example

Code Example

from PyQt5.QtWidgets import QApplication
from pyqt_top_left_right_file_list_widget.topLeftRightFileListWidget import TopLeftRightFileListWidget


if __name__ == "__main__":
    import sys

    app = QApplication(sys.argv)
    topLeftRightFileListWidget = TopLeftRightFileListWidget()
    topLeftRightFileListWidget.show()
    app.exec_()

Result

image

Show file name only

image

You can select multiple files on the list. If at least one file is selected, delete button(red dash icon) will be clickable.

image

Click it and selected ones will be removed from the list.

image

If some of files you want to add already exist in the list, Notice dialog will pop up to show you which files exist in the list. If you click OK, it will add files which are not duplicated. Otherwise none of files you want to add will be on the list.

image

Note

I'm currently working with "Don't ask again" feature. Hope you don't mind.

pyqt-top-left-right-file-list-widget's People

Contributors

yjg30737 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.