Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved How to disable keyboard?

    General and Desktop
    2
    2
    75
    Loading More Posts
    • 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
      AnneRanch last edited by

      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 Reply Quote 0
      • M
        mchinand last edited by mchinand

        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 Reply Quote 1
        • First post
          Last post