Results 1 to 2 of 2

Thread: Is there any way to manipulate the hierarchy without using drag/drop in the preview?

  1. #1
    Join Date
    Jul 2019
    Posts
    1
    Qt products
    Qt5

    Default Is there any way to manipulate the hierarchy without using drag/drop in the preview?

    Maybe I'm just stupid but this seems like it should be really simple...

    All I'm trying to do is put an existing object into a new vertical layout.
    In right-click -> Layout all the options are greyed out, so I've instead just created a new vertical layout and want to plop the existing object into it... but there seems to be no way?

    In the preview pane: The layout has no width when it has no objects, so I can't drag into it...
    In the object pane: There is just no drag and drop functionality at all, which boggles my mind, since this would presumably be much easier that implementing it in the preview pane, and would be far more convenient as well.
    Cut/Paste: Nope. It always just pastes as a child of MainWindow, regardless of the object I have selected.
    In the property pane: No properties for parent or ancestor...
    Nothing I can find in the right-click menus either...

    So what am I missing? Every tutorial online just has people dragging and dropping in the preview but obviously that doesn't work when the object I'm dragging into has no width and REALLY should not be the only means of manipulation. I've been Googling for half an hour on this. Why is something so simple so seemingly impossible?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Is there any way to manipulate the hierarchy without using drag/drop in the previ

    Quote Originally Posted by lupuchard View Post
    All I'm trying to do is put an existing object into a new vertical layout.
    In right-click -> Layout all the options are greyed out
    That probably means you right-clicked on the widget itself instead of the container widget you want to add it to.

    Quote Originally Posted by lupuchard View Post
    In the preview pane: The layout has no width when it has no objects, so I can't drag into it...
    But the container widget usually has a size.

    Are you trying to create a nested layout?

    Cheers,
    _

Similar Threads

  1. Replies: 2
    Last Post: 30th January 2014, 07:46
  2. QDockWidget drag/drop preview
    By harregui in forum Qt Programming
    Replies: 0
    Last Post: 23rd February 2011, 16:30
  3. drag and drop in only one hierarchy of the tree widget
    By fulbay in forum Qt Programming
    Replies: 0
    Last Post: 17th December 2010, 16:57
  4. Replies: 2
    Last Post: 13th October 2010, 22:51
  5. Replies: 0
    Last Post: 4th May 2010, 11:24

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.