Results 1 to 6 of 6

Thread: create border for TextEdit in qml

  1. #1
    Join Date
    Oct 2015
    Posts
    46
    Thanks
    19
    Platforms
    Windows

    Default create border for TextEdit in qml

    how do create border size for TextEdit in qml?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: create border for TextEdit in qml

    For example putting the TextEdit into a Rectangle or BorderImage.

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    ravandi (11th November 2015)

  4. #3
    Join Date
    Oct 2015
    Posts
    46
    Thanks
    19
    Platforms
    Windows

    Default Re: create border for TextEdit in qml

    This method has a problem.
    See the image below:
    qml.png
    Qt Code:
    1. Rectangle {
    2. id: mo
    3. x: 100
    4. y: 8
    5. width: 110
    6. height: 20
    7. border.width: 1
    8. border.color: "#000000"
    9. radius: 10
    10. }
    11.  
    12. TextEdit {
    13. id: textEdit1
    14. x: 100
    15. y: 8
    16. width: 110
    17. height: 20
    18. font.pixelSize: 12
    19. focus: true
    20. }
    To copy to clipboard, switch view to plain text mode 

  5. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: create border for TextEdit in qml

    What exactly is the problem?
    That you are using hardcoded sizes or that the input element allows more text to be entered than its size?

    Cheers,
    _

  6. #5
    Join Date
    Oct 2015
    Posts
    46
    Thanks
    19
    Platforms
    Windows

    Default Re: create border for TextEdit in qml

    Continue text Should not be seen
    Examples of html:
    html.png
    Picture above is correct.

  7. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: create border for TextEdit in qml

    Enable clipping on the rectangle.

    Cheers,
    _

  8. The following user says thank you to anda_skoa for this useful post:

    ravandi (12th November 2015)

Similar Threads

  1. Replies: 2
    Last Post: 17th August 2013, 15:43
  2. Replies: 6
    Last Post: 27th July 2010, 15:31
  3. Replies: 4
    Last Post: 13th July 2009, 18:18
  4. Create a Toolbar on a Subclassed Textedit?
    By c_07 in forum Qt Programming
    Replies: 5
    Last Post: 12th October 2007, 18:17
  5. How to create a movable border between two widgets?
    By Teuniz in forum Qt Programming
    Replies: 2
    Last Post: 16th March 2007, 08:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.