Results 1 to 2 of 2

Thread: My list custom errors. Signal and Slots

  1. #1
    Join Date
    Oct 2012
    Posts
    6
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default My list custom errors. Signal and Slots

    Hi people,

    I want to do something like this:

    I have a enumeration errors like qnetworkreply.

    QNetworkReply::NoError
    QNetworkReply::RemoteHostClosedError
    QNetworkReply::UnknownContentError

    My errors enumeration:

    MyClass::Error1
    MyClass::Error2
    ...

    Now i want to do this

    connect(reply, SIGNAL(sslErrors(QList<QSslError>)),
    this, SLOT(slotSslErrors(QList<QSslError>)));

    How create a class to know this ?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: My list custom errors. Signal and Slots

    Quote Originally Posted by 8080205 View Post
    connect(reply, SIGNAL(sslErrors(QList<QSslError>)),
    this, SLOT(slotSslErrors(QList<QSslError>)));

    How create a class to know this ?
    To know what? If you want a slot that accepts a list of you enum values then declare one. It's basic C++ there is no mystery. What does your enumeration have to do with QSslError?
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Einstein
    If you are posting code then please use [code] [/code] tags around it - makes addressing the problem easier.

Similar Threads

  1. [Signals & Slots] Custom class' signal not detected
    By Mr_Cloud in forum Qt Programming
    Replies: 5
    Last Post: 26th July 2012, 10:35
  2. Custom signal and slots
    By amitahire in forum Newbie
    Replies: 14
    Last Post: 4th July 2012, 12:35
  3. errors when using Q_OBJECT and slots
    By kja in forum Newbie
    Replies: 9
    Last Post: 16th November 2010, 00:23
  4. Signal/Slots, Where can i use it?
    By Tio in forum Newbie
    Replies: 2
    Last Post: 25th May 2010, 01:36
  5. Signal and Slots
    By waynew in forum Newbie
    Replies: 3
    Last Post: 20th November 2009, 03:50

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.