Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved
    1. Home
    2. Tags
    3. disable

    Log in to post
    • All categories
    • L

      Unsolved Disabling mouse event in QGraphicsView?
      General and Desktop • qgraphicsview mouseevent disable • • lansing

      2
      0
      Votes
      2
      Posts
      461
      Views

      jsulm

      @lansing https://doc.qt.io/qt-5/qwidget.html#enabled-prop
      https://doc.qt.io/qt-5/qgraphicsview.html#focusInEvent

    • S

      Unsolved How to disable physical keyboard for certain qml files?
      QML and Qt Quick • keyboard disable • • Sneha.D

      1
      0
      Votes
      1
      Posts
      202
      Views

      No one has replied

    • R

      Solved How to use setDisabled with parameterised Constructor..?
      General and Desktop • this disable constructorpara • • Rohith

      9
      0
      Votes
      9
      Posts
      1942
      Views

      M

      Hi @Rohith

      Happy to see that your problem is solved now,

      you are welcome !

    • M

      Solved QWebView Disable Backspace Key (But Not on HTML Fields)
      General and Desktop • qwebview key event disable backspace • • maximo

      2
      0
      Votes
      2
      Posts
      1593
      Views

      M

      Here's the solution. You have to do it in Javascript. Ensure jQuery is loaded in your web pages (even the IFRAME/FRAME ones) and then apply this code:

      <script type="text/javascript"> $(document).ready(function(){ // Disable backspace key except in fields. $(document).keydown(function(e) { var elid = $(document.activeElement).is('INPUT, TEXTAREA') ; if (e.keyCode === 8 && !elid) { if(e.ctrlKey) { window.history.back(); } else { // disable backspace e.preventDefault(); return false; } } }); }); </script>

      SOURCE: http://stackoverflow.com/a/17278620/105539

    • P

      can I trap click event on a disabled button?
      General and Desktop • qpushbutton disable clickevent • • pmh4514

      3
      0
      Votes
      3
      Posts
      1309
      Views

      P

      Ahh hadn't thought of that. I didn't realize tooltips would activate either on a disabled control. I'll give it a try.