Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Design Tooling
  3. Qt Design Studio
  4. Automatic new lines in qt design studio
QtWS25 Last Chance

Automatic new lines in qt design studio

Scheduled Pinned Locked Moved Unsolved Qt Design Studio
5 Posts 2 Posters 659 Views
  • 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
    Joe McGuchan
    wrote on 16 Aug 2022, 09:55 last edited by Joe McGuchan
    #1

    In qt design studio I have a snippet of code

                                Connections {
                                    target: sceneButton
                                    onPressed: console.log(model.sceneName + " Selected")
                                }
    

    when I save the .ui.qml file it automatically changes the code to

                                Connections {
                                    target: sceneButton
                                    onPressed: console.log(
                                                   model.sceneName + " Selected")
                                }
    

    this is, in my opinion, hideous. However when I go into the settings for the automatic edits on saving and deactivate every one, the problem persists. s there any way to stop design studio doing whatever this is? Thank you.

    EDIT: I wanted to bump this topic with a slightly different question.

    Is there a way to strop the automatic code formatting altogether?

    By company places comments at the top of files with file data, design studio wants to put two new lines before these comments. This is stupendously terrible. Is there any way to just turn of ALL the automatic code formatting instead?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Thomas Hartmann
      wrote on 29 Aug 2022, 15:41 last edited by Thomas Hartmann
      #2

      This is a bug in the code formater for QML/JavaScript and should be fixed.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        Joe McGuchan
        wrote on 5 Sept 2022, 10:49 last edited by
        #3

        Has it been logged as a bug?

        1 Reply Last reply
        0
        • J Offline
          J Offline
          Joe McGuchan
          wrote on 25 Oct 2022, 11:12 last edited by
          #4

          I wanted to bump this topic with a slightly different question.

          Is there a way to strop the automatic code formatting altogether?

          By company places comments at the top of files with file data, design studio wants to put two new lines before these comments. This is stupendously terrible. Is there any way to just turn of ALL the automatic code formatting instead?

          1 Reply Last reply
          0
          • T Offline
            T Offline
            Thomas Hartmann
            wrote on 1 Nov 2022, 11:54 last edited by
            #5

            At this point in time .ui.qml files are always formatted. We can consider adding an option, but I would prefer to fix the code formatter. Can you file a bug report for this?

            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