Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Solved QtCreator exits design mode when not desired

    Tools
    2
    8
    2156
    Loading More Posts
    • 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.
    • dijuna
      dijuna last edited by dijuna

      Steps to reproduce:

      1. Open any source/header file in new window
      2. Open form file in main window (it will enter design mode)
      3. Click on external window to edit the source/header file
        QtCreator will exit designer mode for it's main window, even if the file opened in external window have nothing to do with form being edited. It will show form's code and prompt "this file can only be edited in Design mode".

      Now I have to open QtCreator two times and care about which files to reload and when... any better way to work on UI and code at the same time?

      1 Reply Last reply Reply Quote 0
      • mrjj
        mrjj Lifetime Qt Champion last edited by

        Hi
        shift + f4 , switch fast between design and code.

        1. "Click on external window to edit the source/header file"
          How did u get this external window? ( trying to see your issue)

        "this file can only be edited in Design mode" is lovely example of bad design :)
        It annoys me daily. I press UI file to check something. I press Edit to go back to
        code section, but oh no, this means I want to see the UI as text
        version that i'm not allowed to edit anyway. \o/ :)

        1 Reply Last reply Reply Quote 0
        • dijuna
          dijuna last edited by

          In the top-right corner of code editor, there is "split" button where you can select "open in new window" option. This is what I see on step 2, I moved external window to the right:
          link to image
          Then I click on the right side to edit the code while looking at e.g. widget names on the left side. This is what is happening then:
          like to image
          So the problem is not to switch between modes; I want them both at once because before I figured that I can use two instances of QtCreator, I was using screenshots or pen and paper...

          1 Reply Last reply Reply Quote 0
          • mrjj
            mrjj Lifetime Qt Champion last edited by mrjj

            Ahh, no. That won't work well.
            I use Designer.exe for this.

            D:\Qt\5.7\mingw53_32\bin\designer.exe

            Works much better then trying to make Creator not be epic annoying. :)

            1 Reply Last reply Reply Quote 1
            • dijuna
              dijuna last edited by

              Oh, okay, never thought about it. Thanks, will do. :)

              mrjj 1 Reply Last reply Reply Quote 0
              • mrjj
                mrjj Lifetime Qt Champion @dijuna last edited by mrjj

                @dijuna
                On windows, you can just right clock the UI file and select Open With - > Designer.
                That works ok even if slightly slower than just open :)

                Ps. Designer is multiple doc container so u can open all UI in single Designer. :)

                1 Reply Last reply Reply Quote 2
                • dijuna
                  dijuna last edited by

                  @mrjj just to sort things up, "Open With - > Designer" works also on Linux and that is the approach I'm using now, thanks. :)

                  mrjj 1 Reply Last reply Reply Quote 1
                  • mrjj
                    mrjj Lifetime Qt Champion @dijuna last edited by

                    @dijuna
                    Super. Its good to know same way work cross platform :)

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post