Important: Please read the Qt Code of Conduct -

Can't View Code in Qt Designer

  • Hello. I am using MAC iOS Mojave 10.14.6.

    When I use Qt Designer and click in "View Code", I obtain: "Unable to lauch /anaconda3/bin/uic."

    I have installed anaconda.

    Thank you so much

  • Banned

    Well my first suggestion would be stop using Qt Designer as the code it ultimately produces is horribly ugly and thus next to impossible to work with -- and creating a window using standard pyqt is just as easy and easier once you have done it once and the code you get is as friendly as you make it ;)

  • All right. Thank you so much Denni.

    I have another question:
    To use Qt with Python, I think I have two options: PyQt and PySide. As far as I know, PyQt is a proprietary software while PySide is an open source one. Which is better to work with??

    Thanks again.

  • Banned

    No @sergioloz PyQt5 is not proprietary it just is not as open as PySide2.

    The most significant difference between PyQt5 and PySide2 is the license. PyQt5 is released under the GNU GPL v3 and the Riverbank Commercial License. PySide2 is available under the LGPL v3 and the Qt Commercial License.

    Now if the GNU GPL v3 versus the LGPL v3 license difference does not affect you I would go with PyQt5 otherwise its PySide2

    I find the differences are pretty minimal (but read the information at the link above and you decide) but yeah the former is a bit more restrictive than the latter but in most instances that I can imagine implementing code to capitalize on LGPL is not going to be all that easy and especially not something someone learning Qt is going to be able to implement. Further I find PyQt5 a bit more friendlier than PySide2 and PySide2 is still bit behind the curve (aka not as fully up to date). Still in the end since they both draw from the same source that being Qt then moving code from one to the other would not be overly difficult unless you have written a major piece of work.

  • You can use pyuic4 command on shell: pyuic4 input.ui -o
    nedd to go to your qtform.oi file in cmd and convert with pyuic4 input.ui -o

    I agree with Denni, I know it's difficult to understand especially if you come from a .net environment like me but i have made some progress and its not that difficult.

  • Banned

    Note to make the transition even easier I have helped and I am continuing to help others move away from the Qt Designer to writing their own PyQt5 interfaces from scratch so if you are having any issues with this or do not know where to best start just give me a holler.

  • @Denni-0 hey, denni
    Iam a beginner with pyqt5 and i want to write my own interfaces from scratch with pyqt5
    would you help me to start
    thank you

  • Lifetime Qt Champion

    @Omar1302 hi and welcome to devnet,

    In case you didn't notice, that user has been banned.

    If you have specific issues, then please open a thread about it.

Log in to reply