Important: Please read the Qt Code of Conduct -

[Solved] QTableView in QGroupBox: Mouse ignored for the table view?

  • Hi!

    With the Designer I created a QGroupBox and put a QTableView on it. The Problem with the running program is that QTableView doesn't react on the mouse! It only takes keyboard input... why does it happen and how to fix it?
    There's no problem without the group box, but I want to use it... (Theres also no problem with other controls in the group box, like a plain text edit...)


  • This setup should work. Can you provide us the source code for a

    • short
    • complete
    • compilable
    • running

    program that demonstrates the error.

    Please no full source code of your actual project, boil it down to a demo program that only shows the erratic behavior.

  • //EDIT: "I thought that I was just missing something trivial..."

    Yes, very trivial...
    The hierarchy was incorrect. QTableView was not a child of QGroupBox. I don't know how I messed this up.

    Problem solved.

Log in to reply