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. QLineEdit enables setText even when setReadOnly is "true"

QLineEdit enables setText even when setReadOnly is "true"

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 198 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
    walle19
    wrote on last edited by
    #1

    Hi,
    My QT: version 4.8
    OS: Kubuntu14

    I have a few QLineEdit Objects that I have set with setReadOnly(true)
    For some reason when I call setText on those objects the text appears inside the QLineEdit.

    What is the reason for this?

    Thanks

    JonBJ 1 Reply Last reply
    0
    • W walle19

      Hi,
      My QT: version 4.8
      OS: Kubuntu14

      I have a few QLineEdit Objects that I have set with setReadOnly(true)
      For some reason when I call setText on those objects the text appears inside the QLineEdit.

      What is the reason for this?

      Thanks

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

      @walle19
      setReadOnly() only means that the user cannot interactively type into the widget. You can always set its value in code.

      1 Reply Last reply
      2

      • Login

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