Python qtpy.uic() Examples

The following are 5 code examples of qtpy.uic(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module qtpy , or try the search function .
Example #1
Source File: test_uic.py    From vnpy_crypto with MIT License 5 votes vote down vote up
def test_load_full_uic():
    """Test that we load the full uic objects for PyQt5 and PyQt4."""
    QT_API = os.environ.get('QT_API', '').lower()
    if QT_API == 'pyside':
        assert hasattr(uic, 'loadUi')
        assert not hasattr(uic, 'loadUiType')
    else:
        objects = ['compileUi', 'compileUiDir', 'loadUi', 'loadUiType',
                   'widgetPluginPath']
        assert all([hasattr(uic, o) for o in objects]) 
Example #2
Source File: test_uic.py    From winpython with MIT License 5 votes vote down vote up
def test_load_full_uic():
    """Test that we load the full uic objects for PyQt5 and PyQt4."""
    QT_API = os.environ.get('QT_API', '').lower()
    if QT_API == 'pyside':
        assert hasattr(uic, 'loadUi')
        assert not hasattr(uic, 'loadUiType')
    else:
        objects = ['compileUi', 'compileUiDir', 'loadUi', 'loadUiType',
                   'widgetPluginPath']
        assert all([hasattr(uic, o) for o in objects]) 
Example #3
Source File: test_uic.py    From P4VFX with MIT License 5 votes vote down vote up
def test_load_full_uic():
    """Test that we load the full uic objects for PyQt5 and PyQt4."""
    QT_API = os.environ.get('QT_API', '').lower()
    if QT_API == 'pyside':
        assert hasattr(uic, 'loadUi')
        assert not hasattr(uic, 'loadUiType')
    else:
        objects = ['compileUi', 'compileUiDir', 'loadUi', 'loadUiType',
                   'widgetPluginPath']
        assert all([hasattr(uic, o) for o in objects]) 
Example #4
Source File: test_uic.py    From P4VFX with MIT License 5 votes vote down vote up
def test_load_full_uic():
    """Test that we load the full uic objects for PyQt5 and PyQt4."""
    QT_API = os.environ.get('QT_API', '').lower()
    if QT_API == 'pyside':
        assert hasattr(uic, 'loadUi')
        assert not hasattr(uic, 'loadUiType')
    else:
        objects = ['compileUi', 'compileUiDir', 'loadUi', 'loadUiType',
                   'widgetPluginPath']
        assert all([hasattr(uic, o) for o in objects]) 
Example #5
Source File: test_uic.py    From qtpy with MIT License 5 votes vote down vote up
def test_load_full_uic():
    """Test that we load the full uic objects for PyQt5 and PyQt4."""
    QT_API = os.environ.get('QT_API', '').lower()
    if QT_API.startswith('pyside'):
        assert hasattr(uic, 'loadUi')
        assert not hasattr(uic, 'loadUiType')
    else:
        objects = ['compileUi', 'compileUiDir', 'loadUi', 'loadUiType',
                   'widgetPluginPath']
        assert all([hasattr(uic, o) for o in objects])