Results 1 to 5 of 5

Thread: choosing proper QWidget for drop site

  1. #1
    Join Date
    Nov 2010
    Posts
    3
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    Windows

    Default choosing proper QWidget for drop site

    Hi,

    I am new in Qt programming. I would like to create an application that is similar to those applications used to draw UML diagram, but my application is not really drawing UML diagram.

    My application is to enable user to drag and drop different "nodes", and use lines to connect all these "nodes" to form a tree kind of structure. For each tree, there will be a root node, form root the tree will branch out, at the bottom will be all the leave nodes.

    I know Qt supports drag and drop. And I probably can use QListView to display all the possible "nodes" for user to select from. I just not sure which QWidget is suitable for the drop site, where user is free to move and locate the nodes, and then connect them together with lines to build a tree.

    rgds,

    kc Wong

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 69 Times in 67 Posts

    Default Re: choosing proper QWidget for drop site

    QGraphicsView with QGraphicsScene would be the best guess there. Those are designed for particularly this purpose: showing graphical objects and being able to translate/rotate them without too much mucking about.
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  3. #3
    Join Date
    Nov 2010
    Posts
    3
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    Windows

    Default Re: choosing proper QWidget for drop site

    Thanks Franz.

    At least I know where to start now.

  4. #4
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 69 Times in 67 Posts

    Default Re: choosing proper QWidget for drop site

    I see you got the same advice at Qt DevNet .
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  5. #5
    Join Date
    Nov 2010
    Posts
    3
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    Windows

    Default Re: choosing proper QWidget for drop site

    Ya, I wasn't sure which forum to post this question.

    Thus, I just did a google search and register myself to 4 different forums, hopefully I will get the answer.

    But, thanks a lot for replying. At least I know this is still an active forum.

Similar Threads

  1. [GUI Thread]: Choosing it ! How to ?
    By didier in forum Qt Programming
    Replies: 4
    Last Post: 15th October 2010, 10:03
  2. QFileDialog for choosing filename to save data
    By araglin in forum Qt Programming
    Replies: 2
    Last Post: 1st April 2009, 09:46
  3. Help choosing a model type for QTableView
    By goes2bob in forum Newbie
    Replies: 1
    Last Post: 10th March 2008, 03:22
  4. Choosing a qt4 book
    By asieriko in forum General Discussion
    Replies: 14
    Last Post: 7th October 2007, 15:31
  5. Replies: 2
    Last Post: 19th April 2006, 20:11

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
  •  
Qt is a trademark of The Qt Company.