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. [SOLVED] lineEdit to wrap text
QtWS25 Last Chance

[SOLVED] lineEdit to wrap text

Scheduled Pinned Locked Moved General and Desktop
9 Posts 3 Posters 10.2k 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.
  • K Offline
    K Offline
    kalster
    wrote on last edited by
    #1

    is there a way to get the lineEdit to wrap text? currently the line Edit text goes in a straight line. can i have examples please. thank you in advanced.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      A QLineEdit... is a LINE. You probably want a QTextEdit.

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      1
      • K Offline
        K Offline
        kalster
        wrote on last edited by
        #3

        no, textedit has no return feature. this is why i am asking if there is a way to modify the line edit. is there a way to get line edit to nowrap?

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dangelog
          wrote on last edited by
          #4

          What do you mean with "has no return feature"?

          Software Engineer
          KDAB (UK) Ltd., a KDAB Group company

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kalster
            wrote on last edited by
            #5

            the textEdit has no return function. there is no way for me to know if the return key was pressed.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dangelog
              wrote on last edited by
              #6

              Yes it is: subclass it, override the various key event handlers, and handle the return key in a special way (like, emit a signal).

              Software Engineer
              KDAB (UK) Ltd., a KDAB Group company

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kalster
                wrote on last edited by
                #7

                yes. i did that all ready. the problem is that it can't detect a virtual keyboard. the signal and slot did not work either.

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kalster
                  wrote on last edited by
                  #8

                  this topic is now solved. I found a solution to getting a result from the return key in the textEdit so i don't need a lineEdit anymore. the topic to the fix can be found "here...":http://developer.qt.nokia.com/forums/viewthread/8828/

                  1 Reply Last reply
                  0
                  • L Offline
                    L Offline
                    LindaDN8
                    wrote on last edited by
                    #9

                    I kinda have a hunch that that would solve the problem.

                    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