Skip to main content
Dejan Nedeljkovic
Associate III
November 21, 2019
Question

Disable any touchEvents on screen behind a CustomContainer

  • November 21, 2019
  • 14 replies
  • 4898 views

Hi

I have a CustomContainer (menuScreen) that opens when pressing the menu button on my taskbar.

In the MenuClickHandler function the menuScreen is added and the following container appears:

0690X00000AsHYSQA3.png

By pressing a button the screen is being changed. The problem is when pressing on the white background it could happen that an interaction is triggered (e.g. button pressed) from the screen behind this container.

How can I set the entire screen behind the container inactive or not touchable?

Is there maybe another solution?

Regards Dejan

This topic has been closed for replies.

14 replies

Martin KJELDSEN
Principal III
November 29, 2019

The simulator doesn't compile through the designer.

There's a lot of headerfiles (probably target specific) being included from views. I tried fixing includes and code with #ifndef SIMULATOR but it's a bit too much work.

Could you fix the simulator to work? Generally, having target specific code in your views makes UI code non-portable. Something to consider.

The touch functionality should be the same from within the simulator as on target which allows us to inspect the problem.

Thanks.

/Martin

Dejan Nedeljkovic
Associate III
November 29, 2019

It's because I am including some header files from my main application.

I've never used the simulator.

I'm always testing on my hardware

If you just have a look in TaskBar.cpp (This is where I add the menuScreen) maybe you can see if I am doing something wrong.

Regards

Dejan

Martin KJELDSEN
Principal III
November 29, 2019

I'd rather try it - It's a lot more helpful and efficient for me to be able to debug the application. because from what you're describing you're not doing anything wrong.

Having a gdb-debuggable desktop application would be helpful for you as well to debug pure gui issues.

/Martin

Dejan Nedeljkovic
Associate III
November 29, 2019

To change the whole concept would need some time.

Do you have an example how to make the interface between target code and UI code?

Regards

Dejan