Hello, I`m beginner with QtD, but previously I programming using Qt libs for C++
I wrote the sample code:
( all is in: main.d file that I included in this Ticket )
This code compile ok
I compile that:
dmd *.d -L-lcpp_core -L-lcpp_gui -L-lQtCore -L-lQtGui -L-lqtdcore -L-lqtdgui -O -inline -debug
or without debug:
dmd *.d -L-lcpp_core -L-lcpp_gui -L-lQtCore -L-lQtGui -L-lqtdcore -L-lqtdgui -O -inline
or without debug and optimize:
dmd *.d -L-lcpp_core -L-lcpp_gui -L-lQtCore -L-lQtGui -L-lqtdcore -L-lqtdgui
All compilations complited without error. Great!
This code should:
*track mouse if there is left button pressed
*when mouse move ( and when mouse is tracked ), program change title to display a mouse position
*when left button is released, program don`t track mouse and change title to " "
*mouse press and mouse release are secured by if:
if ( event . button () == Qt . LeftButton ) // Only left button !!!
{
( ... )
}
But:
*mouse press secure don`t work
For examples:
I press a left mouse button and move mouse - title display mouse position - i release left mouse button - title is changed to " "
In this example code of program looks like really good !!!
But in this example:
I press a right or middle mouse button and move mouse - !!! title display mouse position !!! - i release right or middle mouse button - title is not changed to " "
So something in function:
void mousePressEvent ( QMouseEvent event )
{
( ... )
}
from QMainWindow
is broken !!!
Is it a bug ???
Sorry for my bad english.
Thank you very much in advance for any reply.