How to add lines using mouse move?
I am developing a word search game. I have to select the correct words through mouse click+drag. when i click on the first letter and drag the mouse to the last letter, a selection line should be drawn. The letters are placed in labels, the labels are placed inside a gridlayout. in (11 X 11) format?
Waitinf for replies.
Thanks in advance
Re: How to add lines using mouse move?
It may be possible, but will be complex to do with widgets, rather I suggest to using graphics scene.
If using widgets you need to draw the line over all the widgets (QLabels), i.e. draw the line on the parent widget (which contains the 11x11 layout), or can try QStackedWidget to overlay the layout (widget) and the line (widget containing the line)
Re: How to add lines using mouse move?
sir, can you please explain more with codes pls..