It's been a while, but I could finally reproduce the problem with a minimal example. Minimal as in how minimal it can be with a qt application (requires moc to compile).
Failed to create input context for window -- TextEntered event won't be able to return unicode
comes up for every second canvas I create (in this example, I create four canvases in MainWindow::MainWindow()). Does not occur on Windows but on Ubuntu linux.
Any idea on this?
My point still stands. Start a debugger and check what's going on, you know basic programming things.
I can see that
m_inputMethod = XOpenIM(m_display, NULL, NULL, NULL);
in void WindowImplX11::initialize(), line 1267 of WindowImplX11.cpp seems not to be true when the error occurs, but I have no knowledge about those low level things. The circumstances of my own code are always the same.