Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to edit a .ui converted python file?
Forum Updated to NodeBB v4.3 + New Features

How to edit a .ui converted python file?

Scheduled Pinned Locked Moved General and Desktop
7 Posts 4 Posters 6.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John R
    wrote on 25 Feb 2015, 12:44 last edited by
    #1

    Hello All,

    I have created a .ui file while I creating my sample qt python GUI application using qt designer. I have converted this ui file into python using pyuic. Now I want to edit this python file for some GUI changes or I have to add some
    functions to display some data in this GUI!! Is it possible and how I can do this? Could anyone please help me?

    Thanks in advance

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sanjaytheone
      wrote on 26 Feb 2015, 08:50 last edited by
      #2

      Go to project directory, get that file, and open it using "netbeans":https://netbeans.org/ and edit it, save it. Is it what you want?

      Wake up. Eat. Code. Sleep. is Alive ? Repeat : Do nothing.

      J 1 Reply Last reply 18 Mar 2015, 09:05
      0
      • T Offline
        T Offline
        Tripanarium
        wrote on 26 Feb 2015, 09:12 last edited by
        #3

        You may open it with any simple text editor. Usually we should import those files and make changes on the main file. This way, You may change the .ui with the appropriate tools (QCreator...), recompile it and import it as usual.
        As PyQt4 editor and IDE I like "eric6":http://eric-ide.python-projects.org/index.html.

        Einstein: "God does not play dice."
        Bohr: "Einstein, stop telling God what to do... No, no, you're not thinking; you're just being logical."

        J 1 Reply Last reply 18 Mar 2015, 09:06
        0
        • S sanjaytheone
          26 Feb 2015, 08:50

          Go to project directory, get that file, and open it using "netbeans":https://netbeans.org/ and edit it, save it. Is it what you want?

          J Offline
          J Offline
          John R
          wrote on 18 Mar 2015, 09:05 last edited by
          #4

          Dear Sanjay,

          Thank you very much for replying to my question, your suggestion is very useful. My sincere apologies for delaying my response to you due to my confusions on this question and qt forum migration.

          1 Reply Last reply
          0
          • T Tripanarium
            26 Feb 2015, 09:12

            You may open it with any simple text editor. Usually we should import those files and make changes on the main file. This way, You may change the .ui with the appropriate tools (QCreator...), recompile it and import it as usual.
            As PyQt4 editor and IDE I like "eric6":http://eric-ide.python-projects.org/index.html.

            J Offline
            J Offline
            John R
            wrote on 18 Mar 2015, 09:06 last edited by
            #5

            Dear Tripanurium,

            My sincere thanks for replying to my question, your answer is too good, really apologies for delaying my response due to my confusions
            on my question.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mcosta
              wrote on 18 Mar 2015, 09:37 last edited by mcosta
              #6

              @John-R You shouldn't edit the generated file.
              The standard way to use it is to create a subclass of the generated one; in this way if you need to edit the UI and re-generate again you don't loose all your code.

              And my favourite Python IDE is PyCharm

              Once your problem is solved don't forget to:

              • Mark the thread as SOLVED using the Topic Tool menu
              • Vote up the answer(s) that helped you to solve the issue

              You can embed images using (http://imgur.com/) or (http://postimage.org/)

              J 1 Reply Last reply 18 Mar 2015, 09:52
              0
              • M mcosta
                18 Mar 2015, 09:37

                @John-R You shouldn't edit the generated file.
                The standard way to use it is to create a subclass of the generated one; in this way if you need to edit the UI and re-generate again you don't loose all your code.

                And my favourite Python IDE is PyCharm

                J Offline
                J Offline
                John R
                wrote on 18 Mar 2015, 09:52 last edited by
                #7

                @mcosta ,

                Thank you very much for replying me, it is useful.

                But can I use Tkinter to edit this converted UI Python code, and if I copy this converted file to desktop from its QT project directory, will it work? I am familiar with only Tkinter and I am slowly getting familiar with QT creator IDE only, if it is possible then it will be great!

                I am really hesitated to ask this naive question, maybe I am asking very silly!! But still I thought of asking!!

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved