Results 1 to 4 of 4

Thread: How to show a window widget...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2006
    Posts
    27
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to show a window widget...

    Quote Originally Posted by munna
    Because the widget is created in the function tests() and destroyed once out of the function.

    It should rather be

    Qt Code:
    1. void CLinkGUI::tests()
    2. {
    3. ui_sofImpl *test = new ui_sofImpl;
    4. test->show();
    5. }
    To copy to clipboard, switch view to plain text mode 

    Make sure you set the widget attribute Qt::WA_DeleteOnClose so that the widget is deleted automatically when it is closed.
    I just added static before declaration of the variable :

    Qt Code:
    1. static ui_sofImpl test;
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to show a window widget...

    I just added static before declaration of the variable
    Take a look at the FAQ please...

Similar Threads

  1. accessing my main application window widget
    By jayw710 in forum Newbie
    Replies: 8
    Last Post: 15th November 2007, 19:33
  2. WYSIWYG html, Window show png icon mac no!
    By patrik08 in forum Qt Programming
    Replies: 10
    Last Post: 25th May 2006, 12:01
  3. Corner widget in QTabWidget doesn't show up
    By ePharaoh in forum Qt Programming
    Replies: 2
    Last Post: 6th April 2006, 17:02
  4. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16
  5. Replies: 12
    Last Post: 15th February 2006, 10:46

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.