Results 1 to 5 of 5

Thread: Learning how to send SIGNALS from a QDialog to a SLOT QT5

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanked 342 Times in 324 Posts

    Default Re: Learning how to send SIGNALS from a QDialog to a SLOT QT5

    So he has a pointer of class of the same class
    Well, you have some unfortunate naming scheme here.
    class Dialog from line 1 (which inherits QDialog) is not the same as class Dialog forward declared in the Ui namespace.
    Ui::Dialog refers to the class which is automatically generated by uic from the *.ui file, in order to translate your visual design into c++ code needed to setup the interface (btw. this Ui:: class will have the same name as the main object in your .ui form).
    So it's important to understand the difference - Dialog is a class which implements the logic of QDialog, but Ui::Dialog is a class which implements the user interface setup. Those two are not the same class.
    When you call ui->setupUi(widget), you are telling the ui object to apply the interface setup on a given widget. It makes the widget look like the stuff you edited with designer, basically.
    Here, a this pointer is passed, which means to setup the look of current object.
    This is all quite simple, but I understand the confusion caused by the Dialog name.
    I hope it's more clear for you now.

    he declare the method Dialog(QWidget *parent) as is declared at the header file and then does multiple inheritence by passing the parent pointer to QDialog method method (parent object) and to the parent ui method as parameter pass a new UI oject that points to the Dialog??
    Sorry but now I'm confused

  2. The following user says thank you to stampede for this useful post:

    chasapis.christos (13th November 2013)

  3. #2
    Join Date
    Oct 2013
    Posts
    3
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11
    Thanks
    2

    Default Re: Learning how to send SIGNALS from a QDialog to a SLOT QT5

    Thanks!
    Namespace confusion and miss notice... :-(

Similar Threads

  1. live time of objects send via signals
    By tuli in forum Qt Programming
    Replies: 7
    Last Post: 28th November 2012, 09:36
  2. Problems with QNetworkRequest, it does not send signals.
    By nilhcraiv in forum Qt Programming
    Replies: 5
    Last Post: 21st October 2011, 20:00
  3. how to you send signals to a graphics item?
    By technoViking in forum Qt Programming
    Replies: 4
    Last Post: 6th November 2009, 19:40
  4. Replies: 7
    Last Post: 29th May 2009, 08:58
  5. send OS signals to apps on all platforms
    By Morea in forum Qt Programming
    Replies: 3
    Last Post: 21st November 2008, 22:00

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.