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. How to disable keyboard?
QtWS25 Last Chance

How to disable keyboard?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 156 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    This is an old "problem" and I am looking for better solution.
    My MdiChild class is QTexrEdit derived .

    I need to keep the MdiChild process and NOT to change the base class , BUT replace the objects with widgets , not text.

    So far I have removed build

    child->newFile();

    however I can still enter plain text to the MdiChild window.

    How to disable keyboard text entry ?

    MdiChild *child = createMdiChild();
    

    // child->newFile(); temporary no need file build
    child->show();

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mchinand
      wrote on last edited by mchinand
      #2

      I'm not fully understanding what you want to do, but since your MdiChild class is derived from QTextEdit, you can call the QTextEdit:setReadOnly() method; passing it a value of true.

      child->setReadOnly(true);
      
      1 Reply Last reply
      1

      • Login

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