Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to select multiple TextEdit text?
Forum Updated to NodeBB v4.3 + New Features

How to select multiple TextEdit text?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 459 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.
  • S Offline
    S Offline
    senmx
    wrote on last edited by
    #1
    import QtQuick 2.0
    
    Rectangle {
    	Column {
    		TextEdit {
    		    font.pointSize: 20
    		    font.bold: true
    		    selectByMouse: true
    		    readOnly: true
    		    text: 'abc'
    		}
    		TextEdit {
    		    font.pointSize: 20
    		    font.bold: true
    		    selectByMouse: true
    		    readOnly: true
    		    text: 'def'
    		}
    	}
    }
    
    D 1 Reply Last reply
    0
    • S senmx
      import QtQuick 2.0
      
      Rectangle {
      	Column {
      		TextEdit {
      		    font.pointSize: 20
      		    font.bold: true
      		    selectByMouse: true
      		    readOnly: true
      		    text: 'abc'
      		}
      		TextEdit {
      		    font.pointSize: 20
      		    font.bold: true
      		    selectByMouse: true
      		    readOnly: true
      		    text: 'def'
      		}
      	}
      }
      
      D Offline
      D Offline
      daljit97
      wrote on last edited by
      #2

      @senmx I think you can try with this https://doc.qt.io/qt-5/qml-qtquick-textedit.html#persistentSelection-prop

      S 1 Reply Last reply
      0
      • D daljit97

        @senmx I think you can try with this https://doc.qt.io/qt-5/qml-qtquick-textedit.html#persistentSelection-prop

        S Offline
        S Offline
        senmx
        wrote on last edited by
        #3

        @daljit97 Thanks. This can solve part of the problem, but when selecting the next item, you need to release the mouse before selecting the next item.

        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