Results 1 to 4 of 4

Thread: setparent/setparentitem for window

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2021
    Location
    Minneapolis MN USA
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: setparent/setparentitem for window

    The owner can be set, but the parent is a read-only property.

    Qt Code:
    1. var w = new Window ();
    2. w.Owner = Window.GetWindow (this);
    3. w.Show ();
    To copy to clipboard, switch view to plain text mode 
    Last edited by Gary_Elliott; 26th February 2021 at 17:08. Reason: code display correction

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: setparent/setparentitem for window

    var w = new Window ();
    w.Owner = Window.GetWindow (this);
    w.Show ();
    What is this? It isn't Qt code. It isn't even C++, it's C#. So why are you posting this in a Qt forum?
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. SetParent(0) : SetMaximized() vs SetFullScreen()
    By antweb in forum Qt Programming
    Replies: 1
    Last Post: 30th April 2015, 09:30
  2. Cant use QWidget::setParent().
    By vitaR in forum Newbie
    Replies: 2
    Last Post: 2nd July 2014, 01:48
  3. QObject::setParent across threads.
    By psih128 in forum Qt Programming
    Replies: 4
    Last Post: 21st January 2014, 16:01
  4. Replies: 2
    Last Post: 12th June 2009, 10:55
  5. Qt widget setParent
    By bunjee in forum Qt Programming
    Replies: 9
    Last Post: 30th November 2007, 20:38

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.