Hi,

I am implementing plain text editor using QTextEdit.
I have reimplemented MousePressEvent to make sure that ALT and CONTROL buttons are pressed simultaneously during mouse press event.

This is working fine on windows environment. But the same is not working fine on UNIX environment.

On UNIX the following condition is not being true even though all the criterias are met.

"(me->state() & Qt::AltButton) && (me->state() & Qt::ControlButton)" is not being identified on unix.

Following is the code snippet.

I am calling processMousePressEvent function once mousePressEvent Occurs.
void Editor:rocessMousePressEvent( QMouseEvent *me )
{

// Control comes here
//With the key press of Alt and Control button only the selection of text can happen
if( (me->state() & Qt::AltButton) && (me->state() & Qt::ControlButton) )
{
m_bCopyColumn = true;
}
else
m_bCopyColumn = false;
}

The above code is working very well on windows.

I wonder how QT is behaving differently on UNIX and Windows.

Please give some suggestions.

Thanks in advance.