How to use the riffle.browser.FilesystemBrowser function in Riffle

To help you get started, we’ve selected a few Riffle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 4degrees / riffle / test / interactive / browser.py View on Github external
def main(arguments=None):
    '''Interactive test of custom filesystem browser.'''
    if arguments is None:
        arguments = sys.argv

    application = QtGui.QApplication(arguments)

    browser = riffle.browser.FilesystemBrowser()

    screen_size = application.desktop().availableGeometry()
    browser.setMinimumSize(screen_size.width() / 2, screen_size.height() / 2)

    if browser.exec_():
        selected = browser.selected()
        print('Selected: {0}'.format(selected))