Results 1 to 3 of 3

Thread: How to add lines using mouse move?

  1. #1
    Join Date
    Jul 2011
    Posts
    81
    Thanks
    8
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default 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

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default 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)

  3. #3
    Join Date
    Jul 2011
    Posts
    81
    Thanks
    8
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default Re: How to add lines using mouse move?

    sir, can you please explain more with codes pls..

Similar Threads

  1. Replies: 2
    Last Post: 15th June 2021, 16:00
  2. How to move the mouse ?
    By shad0w in forum Newbie
    Replies: 3
    Last Post: 2nd November 2008, 13:55
  3. Move mouse over object
    By ToddAtWSU in forum Qt Programming
    Replies: 17
    Last Post: 3rd October 2007, 15:53
  4. Mouse Move Event
    By merry in forum Newbie
    Replies: 5
    Last Post: 3rd June 2007, 06:26
  5. Move Rectangle on mouse Move
    By vermarajeev in forum Qt Programming
    Replies: 24
    Last Post: 14th May 2007, 05:34

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.