Results 1 to 4 of 4

Thread: C++/Qt 5.7 - QDialog to QMainWindow - signal not connecting to slot

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Posts
    105
    Thanks
    13
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: C++/Qt 5.7 - QDialog to QMainWindow - signal not connecting to slot

    Hello Lesiok,

    Thanks for your response.
    Is the init process is the constructor ?
    No.
    Qt Code:
    1. noobsForm::noobsForm(QStringList passedDataList, QString fileName,
    2. QWidget *parent) : QDialog(parent),
    3. ui(new Ui::noobsForm)
    4. {
    5. ...
    6. ...
    7. initInst();
    8. }
    9.  
    10. void noobsForm::initInst()
    11. {
    12. ...
    13. ...
    14. delay(1000); //process events
    15. qDebug() << "passed letter" << (driveLetter + ":");
    16. emit doGetFileCount(driveLetter + ":");
    17. ...
    18. ...
    19. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: C++/Qt 5.7 - QDialog to QMainWindow - signal not connecting to slot

    How not like yes ? initInst() is called from constructor. Signals are connected after them so what are you surprised that it does not work ?
    Maybe you should first learn the basics of C++.

Similar Threads

  1. QSslSocket: connecting SIGNAL and SLOT
    By Mobility in forum Qt Programming
    Replies: 14
    Last Post: 1st January 2013, 17:59
  2. Connecting custom signal and slot
    By DmitryNik in forum Newbie
    Replies: 4
    Last Post: 12th September 2011, 14:15
  3. Connecting signal and slot by name
    By grayfox in forum Qt Programming
    Replies: 1
    Last Post: 22nd July 2011, 09:00
  4. Replies: 3
    Last Post: 17th November 2010, 14:12
  5. Connecting signal to custom slot?
    By dbrmik in forum Qt Tools
    Replies: 2
    Last Post: 30th April 2009, 09:28

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.