Results 1 to 4 of 4

Thread: Python QT5 Creator

  1. #1
    Join Date
    Sep 2020
    Posts
    3
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Python QT5 Creator

    Hello friends. problems with python and slot creation / adding. I create a python project that contains form.ui and file .py. If you go to form.ui and try to add a clicked slot to the button clicked(), an error appears that the
    "could not find documents matching ui-form.h / Perhaps rebuilding will help"

    THX

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,718
    Thanks
    259
    Thanked 759 Times in 749 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: Python QT5 Creator

    Did you do as suggested? A .ui file is processed by the UIC compiler to generate the ui*.h file. If you haven't run that, you won't have the header file.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Sep 2020
    Posts
    3
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Python QT5 Creator

    how can I start this process with my file?
    i am using qt creator 4.13.1


    Added after 1 53 minutes:


    Thank you very much. I figured it out. I used the command Puic5 -x yourfile.ui -main.py.
    But I still get this error in the editor that there is no .h file
    Last edited by shimek; 27th September 2020 at 20:20.

  4. #4
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,718
    Thanks
    259
    Thanked 759 Times in 749 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: Python QT5 Creator

    It sounds like you have your environment misconfigured in Qt Creator - .h files are only used in C/C++ of course. I don't use Qt Creator for python work so I don't know what you need to change.

    And I think you should be using "pyuic5 -x yourfile.ui -o ui_yourfile.py" as a command line. The usual convention is to name the output file the same as the input file, with a "ui_" prepended to the start. This makes it easy for you to keep track of which ui and py files belong together.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Running Python script on buttonclick in QT creator
    By dustin007 in forum Qt Programming
    Replies: 1
    Last Post: 20th August 2017, 18:02
  2. can I debug perl/python scripts in Qt creator
    By prasad_N in forum Qt Programming
    Replies: 1
    Last Post: 29th January 2016, 04:56
  3. Embedding PyQt4 into an Application running Python via Boost::Python
    By GreyHound in forum Installation and Deployment
    Replies: 1
    Last Post: 6th February 2012, 07:48
  4. Replies: 0
    Last Post: 8th April 2011, 21:10
  5. Replies: 3
    Last Post: 20th September 2010, 09:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.