Results 1 to 19 of 19

Thread: How to show a QDialog ( Designed ) ?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    62
    Thanked 260 Times in 246 Posts

    Default Re: How to show a QDialog ( Designed ) ?

    Or, maybe the name of the slot match the autoconnect rules (i gave you a link in a previous post)

    You can rename the slot: something like
    Qt Code:
    1. void example::openDialog() //and connect with this slot name
    2. {
    3. //use the other class to instantiate the QDialog or the QDialog derived class (with or without ui)
    4. hi *gamatos = new hi(this); //you need to pass 'this' as parent so that you don't get a memory leak
    5. gamatos->show(); //you show the dialog
    6. }
    To copy to clipboard, switch view to plain text mode 

    Or don't connect manually and let autoconnect do the connection
    Last edited by Zlatomir; 17th August 2010 at 19:59. Reason: i forgot to rename the slot

  2. #2
    Join Date
    Aug 2010
    Posts
    107
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    1

    Default Re: How to show a QDialog ( Designed ) ?

    Ok it works... Many thanks.. I need it..

Similar Threads

  1. Replies: 7
    Last Post: 25th July 2016, 14:42
  2. How to show a QDialog ( Designed ) ?
    By Bong.Da.City in forum Qt Programming
    Replies: 5
    Last Post: 17th August 2010, 16:54
  3. use QDialog to show file name
    By damonlin in forum Qt Programming
    Replies: 3
    Last Post: 16th November 2008, 13:52
  4. can't show my QDialog
    By sincnarf in forum Qt Programming
    Replies: 3
    Last Post: 22nd October 2007, 09:33
  5. QDialog: show() and exec() together in constructor?
    By Teuniz in forum Qt Programming
    Replies: 8
    Last Post: 28th February 2007, 11:43

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.