PyQt5 QtQuick

  • Hi,

    After installing PyQt5.5.1 together with Qt5.5.1 on my Ubuntu 14.04 successfully, I ran my simple pyqt file using QtQuick and met this error: undefined symbol: _Z24qt_subtract_from_timeoutii

    Anyone has run into this before?


    #!/usr/bin/env python3
    import sys
    from PyQt5.QtCore import QUrl
    from PyQt5.QtWidgets import QApplication
    from PyQt5.QtQuick import QQuickView
    # Main Function
    if __name__ == '__main__':
        # Create main app
        myApp = QApplication(sys.argv)
        # Create a label and set its properties
        appLabel = QQuickView()
        # Show the Label
        # Execute the Application and Exit


    import QtQuick 2.3
    Rectangle {
        width: 300; height: 300
        color: "red"
        Text {
            id: helloText
            anchors.verticalCenter: parent.verticalCenter
            anchors.horizontalCenter: parent.horizontalCenter
            text: "Hello World!!!\n Traditional first app using PyQt5"
            color: "blue"
            font.pointSize: 14
            horizontalAlignment: Text.AlignHCenter
        Grid {
            id: colorPicker
            rows: 2; columns: 3; spacing: 3
            Rectangle { color: "white";}
            Rectangle { color: "green";}
            Rectangle { color: "blue"; }
            Rectangle { color: "yellow";}
            Rectangle { color: "steelblue";}
            Rectangle { color: "black";}

  • The reason is i also installed python-Qt5, which is based on older Qt5 version.

    find / -name libQt*

    I could see some old qt lib residing in /usr/lib folder:




    The problem maybe inconsistent qt libs, so I remove all qt libs in /usr/lib and replace them with the ones in my home folder. It worked! However this is not recommended since some built-in Ubuntu components may use libQt* in /usr/lib folders. So, just remove python-qt5 and reinstall pyqt5 all over again!

    By the way, for the error relating to Sip API version, we just have to run to remove all sip-related packages then reinstall sip again:

    dpkg -l | grep sip


    sudo apt-get purge python3-sip python3-sip-dev

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.