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?
Forum Update on Monday, May 27th 2025

How to disable keyboard?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 165 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 3 Dec 2021, 20:28 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 3 Dec 2021, 21:48 last edited by mchinand 12 Mar 2021, 21:51
      #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

      1/2

      3 Dec 2021, 20:28

      • Login

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