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. LineEdit alignment does not align

LineEdit alignment does not align

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 2 Posters 716 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.
  • W Offline
    W Offline
    Wallters
    wrote on last edited by
    #1

    Hi! So I was having my first experience with QT designer following one guide for making a simple calculator. I ran into a problem: the text does not align manually, although it seems like it should.
    a03dc9ea-cf9d-4fc3-87a9-cbcc2d4542fd-image.png

    JonBJ 1 Reply Last reply
    0
    • W Wallters

      Hi! So I was having my first experience with QT designer following one guide for making a simple calculator. I ran into a problem: the text does not align manually, although it seems like it should.
      a03dc9ea-cf9d-4fc3-87a9-cbcc2d4542fd-image.png

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @Wallters
      I believe you have done the right thing. However, I am not sure it has fully taken in Designer: because this changes the default from align left you should see that alignment (a) is in bold and (b) now shows AlignRight, AlignVCenter while yours still shows AlignLeft, AlignVCenter.

      Have you clicked off that item to let it "take"? If you Preview your dialog from Designer (or run your application) how does it appear?

      W 1 Reply Last reply
      0
      • JonBJ JonB

        @Wallters
        I believe you have done the right thing. However, I am not sure it has fully taken in Designer: because this changes the default from align left you should see that alignment (a) is in bold and (b) now shows AlignRight, AlignVCenter while yours still shows AlignLeft, AlignVCenter.

        Have you clicked off that item to let it "take"? If you Preview your dialog from Designer (or run your application) how does it appear?

        W Offline
        W Offline
        Wallters
        wrote on last edited by
        #3

        @JonB

        Have you clicked off that item to let it "take"?

        When I click off it just goes to default AlighLeft. And if I run it it's also always alligned to left.

        JonBJ 1 Reply Last reply
        0
        • W Wallters

          @JonB

          Have you clicked off that item to let it "take"?

          When I click off it just goes to default AlighLeft. And if I run it it's also always alligned to left.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @Wallters
          Ah! Well that does not sound good, does it?! I don't know why. Could you take a moment to create a totally standalone new widget/dialog with just a QLineEdit on it and see what happens there?

          W 1 Reply Last reply
          0
          • JonBJ JonB

            @Wallters
            Ah! Well that does not sound good, does it?! I don't know why. Could you take a moment to create a totally standalone new widget/dialog with just a QLineEdit on it and see what happens there?

            W Offline
            W Offline
            Wallters
            wrote on last edited by
            #5

            @JonB nope. The only change it allows is vertical Allign Top

            JonBJ 1 Reply Last reply
            0
            • W Wallters

              @JonB nope. The only change it allows is vertical Allign Top

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by JonB
              #6

              @Wallters
              Works fine for me with a standard Qt Creator 6.x. What does your Help > About Qt Creator... tell you have? If it's a new one, especially perhaps the 10.x just released, maybe that is an issue...?

              UPDATE
              https://bugreports.qt.io/projects/QTBUG/issues/QTBUG-113441
              https://bugreports.qt.io/browse/QTBUG-112682

              This is why I wouldn't touch a "new" Creator/Designer with a bargepole, but that's just me.....

              If I understand correctly, it claims that you need Qt version 6.5.1 or 6.6.0. Your Help > About... tells you which version of Qt your Creator has been compiled against.

              1 Reply Last reply
              0
              • W Offline
                W Offline
                Wallters
                wrote on last edited by
                #7

                I see... So it's juss because of new version?

                JonBJ 1 Reply Last reply
                0
                • W Wallters

                  I see... So it's juss because of new version?

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by
                  #8

                  @Wallters I appended the last line above, see what version of Qt your Creator has been compiled against.

                  W 1 Reply Last reply
                  0
                  • JonBJ JonB

                    @Wallters I appended the last line above, see what version of Qt your Creator has been compiled against.

                    W Offline
                    W Offline
                    Wallters
                    wrote on last edited by
                    #9

                    @JonB 6.5.0
                    I downloaded 5.11.1 and it works perfectly there.

                    JonBJ 1 Reply Last reply
                    0
                    • W Wallters

                      @JonB 6.5.0
                      I downloaded 5.11.1 and it works perfectly there.

                      JonBJ Offline
                      JonBJ Offline
                      JonB
                      wrote on last edited by
                      #10

                      @Wallters
                      :)
                      That confirms this is the issue.

                      I am unclear whether you mean you have replaced Creator-only with Qt 5.11.1 or the Qt you will compile your projects against with 5.11.1. The former is OK --- so long as Creator works fine --- but if you want your Qt development to be against Qt6 it won't do.

                      If you could get a 6.5.1 or 6.6.0 you would be in a better position that you started from.

                      W 1 Reply Last reply
                      0
                      • JonBJ JonB

                        @Wallters
                        :)
                        That confirms this is the issue.

                        I am unclear whether you mean you have replaced Creator-only with Qt 5.11.1 or the Qt you will compile your projects against with 5.11.1. The former is OK --- so long as Creator works fine --- but if you want your Qt development to be against Qt6 it won't do.

                        If you could get a 6.5.1 or 6.6.0 you would be in a better position that you started from.

                        W Offline
                        W Offline
                        Wallters
                        wrote on last edited by
                        #11

                        @JonB I didn't replace, I just checked if it works. I think I'll just make a new file or download 6.6.0. Since it's my first try - nothing critical about it.

                        Thanks a lot for your help!

                        1 Reply Last reply
                        1
                        • W Wallters has marked this topic as solved on

                        • Login

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