Signal - Slot issue

I have a VirtualKeyboardService that is configured in this way:

constchar *uri = "bb.cascades.bps";
qmlRegisterType(uri, 1, 0, "BPSMonitor");
qmlRegisterType(uri, 1, 0, "VirtualKeyboardService");

QML :
 attachedObjects: [
            BPSMonitor {
                id: bpsMonitor

                //Receive events when the keyboard becomes visible or hides
                virtualKeyboardService: VirtualKeyboardService {
                    id: virtualKeyboardService
                    // Swipe from the bottom-left bezel towards the center of the
                    // screen to force the keyboard to be visible
                }
            }
]

I don't know how to put in place in order to provide this service to the main application class.   I think I need a signal / slot, but don't understand how to set up.   You will need to send a REAL simple when a certain touch.

VirtualKeyboardService has these signals:

Tags: BlackBerry Developers

Similar Questions

  • Problems with GPS signal/slot

    Hello

    I try to get GPS information for my application. I did a class to do so.

    #ifndef GPSHANDLER_H_
    #define GPSHANDLER_H_
    
    #include 
    
    #include 
    
    #include 
    #include 
    #include 
    
    using namespace QtMobilitySubset;
    
    class GPShandler : public QObject{
        Q_OBJECT
    public:
        GPShandler(QObject* parent);
        virtual ~GPShandler();
    private Q_SLOTS:
        void positionUpdatedSlot(const QGeoPositionInfo &geoInfo);
    
    public:
        void start();
    
        void stop();
    
        double Latitude();
    
        double Longitude();
    
    private:
        double mGeoInfoLat;
        double mGeoInfoLong;
        QGeoPositionInfoSource *mGeo;
    };
    #endif /* GPSHANDLER_H_ */
    
    #include "GPShandler.h"
    
    GPShandler::GPShandler(QObject* parent)
    : QObject(parent) {
        mGeoInfoLat = 0;
        mGeoInfoLong = 0;
        mGeo = QGeoPositionInfoSource::createDefaultSource(this);
        if (mGeo) {
            bool checkval = connect(mGeo, SIGNAL(positionUpdated(const QGeoPositionInfo &)), this,
                    SLOT(positionUpdatedSlot(const QGeoPositionInfo &)));
    
            mGeo->setPreferredPositioningMethods(QGeoPositionInfoSource::SatellitePositioningMethods);
            mGeo->setUpdateInterval(1000);
    
            //checkval = mGeo->setProperty("backgroundMode", true);
            //int i = 3;
        }
    }
    
    GPShandler::~GPShandler() {
        // TODO Auto-generated destructor stub
    }
    
    void GPShandler::positionUpdatedSlot(const QGeoPositionInfo &geoInfo) {
        // Here's where you can do something with the device's position
        mGeoInfoLat = geoInfo.coordinate().latitude();
        mGeoInfoLong = geoInfo.coordinate().longitude();
    }
    
    void GPShandler::start()
    {
        mGeo->startUpdates();
    }
    
    void GPShandler::stop()
    {
        mGeo->stopUpdates();
    }
    
    double GPShandler::Latitude()
    {
        return mGeoInfoLat;
    }
    
    double GPShandler::Longitude()
    {
        return mGeoInfoLong;
    }
    

    As you can see I have connected the signal postionUpdate() of QGeo class that I use for the positionUpdatedSlot() of the slot. I use the class as follows:

    Pop = new GPShandler (this);

    void::startTimer() {} App

    Pop-> start();

    }
    void::stopTimer() {} App

    Pop-> stop();

    }

    which are called when a key is pressed. However, the positionUpdatedSlot() of slot function is never called. I have debugged in my code and cannot find the problem. I can confirm the work of connection (function returns true), and that presented startup and shutdown functions are called as expected. Is there a reason why my slot machine function is not called?

    Note: I have another implementation of signal/slot in this app:

    Connect (mTimer, SIGNAL (timeout ()), this, SLOT (update ()));

    and it works very well.

    Thank you

    Gerry

    I do not know which of the following has solved my problem, but in any case, it's working now after doing these things:

    1. give permission to app to device identification information. (I had already given GPS, but examples also being device identifying information I thought I'd try that)

    2. remove the line:

           mGeo>setPreferredPositioningMethods(QGeoPositionInfoSource::SatellitePositioningMethods);
    

    as an example, I created using this example: http://blackberry.github.com/Cascades-Samples/geo-locationdiagnostics.html did not have this line

  • Object to QML C++ signal/slot mechanism transfer

    Hello!

    I have a simple class:

    // myclass.hh
    
    class MyClass : public QObject {
    
        Q_OBJECT
    
        Q_PROPERTY(QString title READ title)
    
    public:
        MyClass(QObject* parent = nullptr)
            : QObject(parent)
        {}
    
        ~MyClass() {}
    
        MyClass(const MyClass&, QObject* parent = nullptr)
            : QObject(parent)
        {}
    
        QString title() const
        {
            return title_;
        }
    
    private:
        QString title_;
    };
    
    Q_DECLARE_METATYPE(MyClass);
    

    and in the main function, I save my metatype system class

    // main.cc
    
    ...
    qRegisterMetaType("MyClass");
    
    MainClass mainclass;qml->setContextProperty("mainclass", mainclass);
    ...
    

    and in another place, I try to convey the purpose of the MyClass class via the signal:

    // mainclass.hhclass MainClass : public QObject {    Q_OBJECT
    ...
    signals:
        void my_signal(MyClass);
    ...
    };
    // mainclass.cc
    ...
        MyClass mc;
        emit my_signal(mc);
    ...
    

    and try to catch this object in qml slot:

    // .qml
    
    Container {
        onCreationCompleted: {
            mainclass.my_signal.connect(signalHandler)
        }
    
        function signalHandler(myClassObj) {
            console.log('we here') // output 'we here'
            console.log(myClassObj.title) // output 'undefined'
            console.log(myClassObj.title()) // empty output
        }
    }
    

    Macro Q_INVOCABLE added before the declaration of MyClass::title() has the same effect.

    What is wrong with my code?

    This is the signal for all

    Q_SIGNALS:
    
        void addedToAllOrder(Order* order);
    

    Order is registered:

    qmlRegisterType("org.ekkescorner.data", 1, 0, "Order");
    

    Import in qml:

    import org.ekkescorner.data 1.0
    

    Qml connection:

    onCreationCompleted: {
            dataManager.addedToAllOrder.connect(onAddedToAllOrder)
        }
    

    Important! set a property in qml:

    Page {
        id: orderPage
        .....
        property Order anotherOrder
    

    then everything works well in qml function (SLOT)

        function onAddedToAllOrder(theOrder) {
            anotherOrder = theOrder
            console.debug("Order added: " + anotherOrder.nr)
        }
    

    This is how I have face this kind of stuff

    using a pointer ensures that there'e really a single object used in memory and you can use QML.

    the cool thing: he is glad assist in qml: type anotherOrder. ... gives all properties to select and you deal directly with your C++ object. don't forget that your C++ class is the owner (parent) of your object

    hope that gives you some ideas to try

  • Problem with signals slots ToggleButton

    Trying to connect a signal to a slot:

    connect(myToggleButton, SIGNAL(checkChanged(bool)), myDataClass, SLOT(setMyValueOn(bool)));
    

    In myDataClass.hpp:

    public slots:
      void setMyValueOn(bool valueOn);
    

    In the cpp file:

    void MyDataClass::setMyValueOn(bool valueOn)
    {
      // never called
    }
    

    I have the MyDataClass is a subclass of QObject and Q_OBJECT at the appropriate place in the file of the hpp.

    I think that I incorrectly use the toggle switch.

    The signal is called checkedChanged (bool).

    BTW, I suggest using Qt Creator, if you develop mostly in C++. It has the very practical signals AutoComplete functionality.

  • Error in the creation of custom signal slot

    My header class code

    signals:
        void newinfo(int a);
        void testing();private slots:        void process_new_info(unsigned char[]);
    

    My class of CPP.

    connect(this, SIGNAL(newinfo(int)), this,SLOT(process_new_info(unsigned char[])));
    
    void APP::newinfo(int a){
    
    }
    

    When I built the code, I get the error message saying firstly define here (near the function definition)

    Thank you

    Dembélé George Jacob

    You're doing it wrong
    You can not send INT (Sub newinfo(int a)) and receive unsigned char [] (Sub process_new_info (unsigned char []))

    The rest is good
    private, signals, locations etc...

     

    Please read the signals and the QT Slots

    https://developer.BlackBerry.com/native/documentation/Cascades/dev/signals_slots/

  • Second Signal SIM issues

    In my office, BSNL signal strength is very low or zero. What is happening, because of the long period, there is no signal, a red triangle is are displayed instead of the intensity of the signal. Even when to move to the area and full signal at my home, phone will not get the signal, I turn off and turn on to get the signal.

    I think it's a problem with BSNL. This only happens when using BSNL sim(3G/2G). I tried to use Airtel.There were no grave signal and he was very coherent. If you don't get the internet connection, try to activate the wifi hotspot and so it triggers your cellular data. It worked for me. After a minute, disable the hotspot. Now turn off and then turn on the mobile data settings (do not in the menu of data usage).

    Another option is to do the following: GO to settings-> settings-> BSNL Dual sim-> mobile data-> Preferred 2G network. Use 2G for a minute and then return to the settings and change the favorite to the 3G network. It should work fine.

    Here are some of the temporary remedies for this problem. There is still no rail to solve this problem.

  • Problem, the signals and Slots

    Hi, as I posted in one of my other posts I have following problem with signals and messages and would be nice if someone could clarify anything that I don't seem to be able to find what the problem of the outputs.

    I have the code:

    void MYNetworkClass::requestFinished(QNetworkReply* reply)
    {
    
          // Check the network reply for errors
          if (reply->error() == QNetworkReply::NoError)
          {
             // read response
             const QByteArray response(reply->readAll());
             qDebug() <<"Response: "<< response;
    
             JsonDataAccess jda;
             QVariantMap results = jda.loadFromBuffer(response).toMap();
    
             QVariantMap data = results.value("SomeData").toMap();
    
             emit signalSuccess(data); // I reach here .... 
    
    // however actually when I click "Step Over" in debug mode, and try to exit the function// afterwards I get such "error" saying: No source available for "QMetaObject::activate() at  0xb9668da7" - highlighted in red.
    
         }
         else
         {
             qDebug() << "\n Problem with the network";
             qDebug() << "\n" << reply->errorString();
         }
    

    In MyNetwork class I also added the definition of signal in the header file:

    signals:
    
        void signalSuccess(QVariantMap result);
    

    Now also when someone calls an object MyNetworkClass method which calls requestFinished,.

    I want to catch the signal which is emitted by the requestFinished - as shown above.

         MyNetworkClass *network = new MyNetworkClass();
    
        QMap params;
        params.insert("username", userEmail);
    
        bool res = QObject::connect(network, SIGNAL(signalSuccess(QVariantMap)), this, SLOT(SomeSlotForSignal(QVariantMap)));
    
            Q_ASSERT(res);
        Q_UNUSED(res);
            network->makePostRequest("Login");
    

    My problem is that the SomeSlotForSignal slot never is called... (even if the signal is issued constitute requestFinished method and as I stated SomeSlotForSignal as a crack in the header file...) What can be problem? Any help? Thank you.

    I guess I solved the problem.

    The code I presented previously registered function

    F of a class B:

     void B::f()
    {
    MyNetworkClass *network = new MyNetworkClass();
    
        QMap params;
        params.insert("username", userEmail);
    
        bool res = QObject::connect(network, SIGNAL(signalSuccess(QVariantMap)), this, SLOT(SomeSlotForSignal(QVariantMap)));
    
            Q_ASSERT(res);
        Q_UNUSED(res);
    
    network->makePostRequest("Login");
    }
    

    Then the function f is called to:

        B object;
        object.f();
    
    The problem was I think that when the server responded "object" was destroyed from the stack. When I replaced the above code, with 
    
         B* object = new B();
        object->f();
    
    I think it works now......
    
  • Error while establishing an Http connection. Once finished signal request is displayed, no call slot

    I'm instantiated MyNetwork class on click of a button in my app class.

    Therefore it is called class constructor MyNetwork in which I'm checking the availability of the network.

    Once found an available network, a sendRequest() method is called that a get request is initialized.

    And the QNetworkAccessManager object emits a finished(QNetworkReply *) signal is connected to a slot (requestFinished(QNetworkReply *reply)) of this class of MyNetwork .

    When the user clicks on the button in the file app.cpp, create an object of class MyNetwork and checking the availability of the network works within its constructor.

    also the connect() method returns true , but sinking ever crack (requestFinished(QNetworkReply *reply)) method where I am Manager of my answer.

    MyNetwork. HPP

     

     

    #ifndef MYNETWORK_HPP_
    #define MYNETWORK_HPP_
    
    #include
    #include 
    #include
    #include
    #include
    #include 
    #include 
    #include
    
    /*!
     * @brief Network Connection Implementation
     */
    class MyNetwork:public QObject
    {
        Q_OBJECT;
    
        public :
            MyNetwork();
    
            /*!
             * @brief Method to create and send request
             */
            void sendRequest();
            /*!
             * @brief Method to check if network is available
             */
            bool isNetworkAvailable();
    
        private slots:
                void requestFinished(QNetworkReply *reply);
    
    };
    
    #endif /* MYNETWORK_HPP_ */
    

    MyNetwork.cpp

     

     


    #include
    #include
    #include
    #include
    
    QNetworkAccessManager *mNetworkMgr;
    
    MyNetwork::MyNetwork() {
    
        if (isNetworkAvailable()) {
            sendRequest();
        } 
    
    }
    
    void MyNetwork::sendRequest() {
    
        mNetworkMgr = new QNetworkAccessManager(this);
        QNetworkReply *reply =
                mNetworkMgr->get(
                        QNetworkRequest(
                                QUrl(
                                        "http://developer.blackberry.com/cascades/files/documentation/device_platform/networking/model.xml")));
        if (reply) {
            qDebug() << "Reply from server is " << reply;
        }
        bool resFromServer = connect(mNetworkMgr, SIGNAL(finished(QNetworkReply*)),
                this, SLOT(requestFinished(QNetworkReply*)));
        qDebug() << "Connection is success : ? : " << resFromServer;
        Q_ASSERT(resFromServer);
        Q_UNUSED(resFromServer);
    }
    
    void MyNetwork::requestFinished(QNetworkReply *reply) {    if (reply) {
            if (reply->error() == QNetworkReply::NoError) {
                qDebug() << "No Error";
            } else {
                int httpStatus = reply->attribute(
                        QNetworkRequest::HttpStatusCodeAttribute).toInt();
                qDebug() << "Error and the code is " << httpStatus;
            }
            reply->deleteLater();
        } else {
            qDebug() << "Reply comes out to be null";
        }
    }
    
    bool MyNetwork::isNetworkAvailable() {
        QNetworkConfigurationManager netMgr;
        QList mNetList = netMgr.allConfigurations(
                QNetworkConfiguration::Active);
        if (mNetList.count() > 0) {
            if (netMgr.isOnline()) {
                return true;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
    

    Hmm. I just did a quick test for the for you network code.

    I movedbool resFromServer = connect(mNetworkMgr, SIGNAL(finished(QNetworkReply*)),
    this, SLOT(requestFinished(QNetworkReply*)));
    
    to  be before
    
    QNetworkReply *reply =
    mNetworkMgr->get(
    QNetworkRequest(
    QUrl(
    "http://developer.blackberry.com/cascades/files/documentation/device_platform/networking/model.xml")));
    
    in my test.
    

    As I mentioned to signal before start us sending application network.

    I got "Error no." in the newspaper which seemed to have indicated that the signal/slot was triggerred properly in my case.

    Question for you:

    How did you create your object "MyNetwork"?

    is the object still alive when the network request signal is triggerred?

    Maybe the code for create/destorying your object "MyNetwork" segment will be useful

  • MediaPlayer error() not marked as Qt signal?

    Hello

    Using the SDK 10.1.0.4828 and try to catch the mistakes of MediaPlayer.  Momentics, the line below is reported as a bug and my slot is never called.

         this->connect(&m_player, SIGNAL(error(bb::multimedia::MediaError::Type mediaError, unsigned int position)), this, SLOT(onPlaybackError()));
    

    the error is:

    MediaPlayer::error(bb::multimedia::MediaError::Type mediaError, unsigned int position) has not been tagged as a Qt signal; make sure all parameter types are fully qualified.
    

    the application compiles and works very well, but if there is a mistake in the reading of the media, my onPlaybackError() function never fires.

    How do I make this signal/slot connection to make it work?

    THX,

    J

    Do not include the parameter names in the connect(), only to types. Also, your site must have parameters to your signal, even if you don't use them. If it is not the connection will fail.

    Finally, it is common to save the return value of connect() function and then test it with Q_ASSERT(), so you are alerted to signal/slot connection issues when you run the application. This can save debugging headaches later.

    oddboy wrote:

    Hello

    Using the SDK 10.1.0.4828 and try to catch the mistakes of MediaPlayer.  Momentics, the line below is reported as a bug and my slot is never called.

           this->connect(&m_player, SIGNAL(error(bb::multimedia::MediaError::Type mediaError, unsigned int position)), this, SLOT(onPlaybackError()));
    

    the error is:

    MediaPlayer::error(bb::multimedia::MediaError::Type mediaError, unsigned int position) has not been tagged as a Qt signal; make sure all parameter types are fully qualified.
    

    the application compiles and works very well, but if there is a mistake in the reading of the media, my onPlaybackError() function never fires.

    How do I make this signal/slot connection to make it work?

    THX,

    J

  • finished() signal for invoke() on phone app)

    I use bb::system:InvokeManager to start a call using action 'bb.action.DIAL '.

    response of bb::system:InvokeTargetReply * const = invokeMgr.invoke (invokeRequest);

    Invoke() will return an InvokeTargetReply. This response will signal finished(). I use

    Boolean result = QObject::connect (response, SIGNAL (finished (()), this, SLOT (onInvokeResult ()));

    to connect the signal with the slot. However, my CRACK onInvokeResult() is never called. Why is this?

    (1) something wrong with my application?

    (2) signal/slot mechanism only works inside your own application. If this approach can be used when calling invoke() to an external application. Signal/slot isn't an IPC mechanism.

    Documentation says errorType and errorCode is valid after the finished() signal.

    BB::System:InvokeTargetReply * response = qobject_cast(sender());
    BB::System:InvokeReplyError:type errorType = response-> error();
    int errorCode = response-> errorCode();

    If the signal/slot mechanism cannot be used internally within your own application, how can you know if the invoke() on an external application would be successful?

    I wasn't looking to extract the right aways errorType and errorCode after calling invoke()... maybe that can already tell me the result?

    BR, René

    Thanks for sharing this code. My code is almost the same. And I solved the problem. My code now looks like this:

    BB::System:InvokeManager invokeMgr;
    response of BB::System:InvokeTargetReply * = invokeMgr.invoke (invokeRequest);
    If (answer)
    {
    Set the parent for this 'response' otherwise 'response' will be deleted at the end of this function.
    response-> setParent (this);
    Boolean result = QObject::connect (response, SIGNAL (finished (()), this, SLOT (onInvokeResult ()));
    ...

    void controller:nInvokeResult()
    {
    Get the response from the sender object
    BB::System:InvokeTargetReply * response = qobject_cast(sender());
    BB::System:InvokeReplyError:type errorType = response-> error();
    int errorCode = response-> errorCode();

    response-> deleteLater();
    }

    It turns out that it is absolutely essential to add a parent to the response using the line "answer-> setParent (this);" in order to receive the signal finished(). If this line is commented out, then the slot is more will be called.

    You may not use a local variable for the answer, but a member of the class. That also seems to work.

    Thanks for the help!

    BR, René

  • (SLOT) timer not firing

    I call a call in a method:

    QTimer::singleShot(1000, this, SLOT(timerComplete()));
    

    In my header file, I have:

    private slots://private Q_SLOTS:
      void timerComplete();
    

    I also tried the line without comment above, because I'm not sure of the difference, but neither eventually call the timerComplete method:

    void MyClass::timerComplete()
    {
      std::cout << "Fired" << std::endl;
    }
    

    -Ensure the Q_OBJECT macro is present in the .h file and you are inheriting from QObject or its subclasses.

    -"Q_SLOTS' and 'slots' are essentially the same. When they are analyzed by the Department. Access specifiers are ignored during the call via the mechanism of signal/slot slot machines.

    Slot & QTimer code looks OK.

  • There is no such thing as PushService createChannelCompleted signal

    Dear BlackBerry developers

    I am building an active push application. So I started with the PushService class to create a session and a channel and other things. Because I need the token server gives to my application, I need to connect with the createChannelCompleted (const bb::network:ushStatus status, const QString & token) signal. This signal is copy pasted from the documentation on here http://developer.blackberry.com/cascades/reference/bb__network__pushservice.html.

    But I always get the following error message

    Object::connect: No such signal PushManager::createChannelCompleted

    I tried all the ways to connect with the signal

    connect(pushService, SIGNAL(createChannelCompleted(const bb::network::PushStatus&, const QString&)), this, SIGNAL(createChannelCompleted(const PushStatus&, const QString&)));
    

    But I can't get it right, apparently.

    Thanks in advance!

    Hello

    This should work:

    QObject::connect(service, SIGNAL(createChannelCompleted(bb::network::PushStatus,QString)),
                         this, SLOT(onCreateChannelCompleted(bb::network::PushStatus,QString)));
    

    Statement of slot: / / upd: fixed a statement of slot

    void onCreateChannelCompleted(const bb::network::PushStatus &status, const QString &token);
    

    Your statement should probably also work if you replace second SIGNAL() SLOT() and use a full PushStatus in the slot. But for const const reference and & can be left inside the SIGNAL() and SLOT() statements. MOC will remove them automatically anyway.

  • Capture AbstractActionItem SIGNAL to slip into the menu drop-down

    Hello

    So I need to do anything when I press the ActionItem in slide it towards the bottom of the context menu on BB10.

    I created the shot on the menu drop-down

        Menu *menu = Menu::create();
        Image infoIcon = Image(QUrl("asset:///images/info"));
        menu->addAction(ActionItem::create().title("Info").image(infoIcon));
        menu->setObjectName("infoItem");
    

    Looked at the docs. AbstractActionItem

    https://developer.BlackBerry.com/Cascades/reference/bb__cascades__abstractactionitem.html the action point emits a triggered() Signal.

    Then ran info a bunch of question that did not help.

    • Looked QTDocs
    • Looked at the signals & Slots section of BB stunts Docs

    in my App.hpp file I added

    public:
       void debugText();
    

    I tried to connect the menu by using the following code:

    connect(menu->objectName(), SIGNAL(triggered()), this, SLOT(debugText()));
    

    It does not work, and I spent 2 hours trying to figure why not.
    How do you connect in fact these things?

    Thank you!

    Hello

    trigger signal is attached to ActionItem itself and not Menu object.

    And don't forget the Q_SLOT macro.

    class xxx : virtual QObject {
      Q_OBJECT
    
    public:
      Q_SLOT void debugText(void);
    };
    
    Menu *menu = Menu::create();
    Image infoIcon = Image(QUrl("asset:///images/info"));
    
    ActionItem *mItem = ActionItem::create().title("Info").image(infoIcon)
    
    menu->addAction(mItem);
    menu->setObjectName("infoItem");
    
    connect(mItem, SIGNAL(triggered()), this, SLOT(debugText()));
    

    Nicklas

  • Crash of garbage collection problem!

    Hello everyone.

    I am doing multithreaded in my application. In my new thread, I use two signals and two locations.

    Task of 1 signal & slot-

    Given a parameter object in the signal I invoke a member function of that class in the slot.

    Task of 2nd signal & slot-

    Given the same parameter of the object to delete this object.

    You may occur a quesiton why am I erasing memory in this way. In fact in my new thread using 1 signal & slot I want to download map mosaic of the server. But in the QT framework I couldn't download my new wire tile map. So, I use the MoveToThread() to move my new thread to the main thread object and let the main thread to do it for me. But now when I want to free my memory I can't delete my new thread because the main thread works with it. So I introduse signal 2nd slot mechanism to free my memory.

    All the thing works well and good, except when I pan my card at all times & quickly he got crashed. Because my 1 signal & slot occupant already deleted object by 2nd signal slot.

    I hope that I make you all understand the situation, if you need more information please let me know. This is a very critical issue for me. Hopyfully you guys can help me.

    Hi sreejond,

    I have a similar scenario in my application, in which case I use another thread to load the data of my main thread to use.  It's the approach that I took:

    Main thread invokes, charger wire;

    Charger wire creates data objects and load the data in passes them to the main thread via a signal. (don't forget to use the MoveToThread() before issuing the sound signal).

    Main thread receives the objects through a slot and then stores and uses the data objects.

    Main thread deletes the data timely objects.

    I think that if you simplify what you're trying to do, you will get a better result. I guess your main thread knows when it's time to remove the objects, so it can manage (delete) the himself.

  • Creating timer in order to send emails several times

    Hello

    I implement the application to send e-mail to interval given repeatedly.

    time-out signal connects to defines the slot. But the signal is never issued, how to check if the signal is issued or not.

    I give the interval to 1000ms for the timer.

    Also the timer must be created in a separate category?

    Thank you and best regards,

    Shubhangi

    With the help of a QTimer right? It can be used in the same class.

    What's your line connect? Something like that?

    Connect (timer, SIGNAL (timeout ()), this, SLOT (sendEmail (()));

    You can paste a few qDebug (from) or from printf in the slot (sendEmail()) to see if she is going to get.

Maybe you are looking for

  • How can I use a Sony Blue Ray on my Macbook Pro

    I have a Sony Blue ray with HDMI and I wanted to watch a movie on my mac, but when I use my HDMI port on my computer, the device is an empty file and the video player cannot display the dvd player.  knows there are adapters for HDMI to love at first

  • Update ios 9.3 I can't unlock my iphone

    ไม่สามารถเปิดใช้งาน iphone ของคุณเนื่องจากเซิร์ฟเวอร์ที่ทำการเปิดให้ใช้ไม่พร้อมใช้งานชั่วคราว

  • Installation and implementation of new programs on OMNI 10

    I'm learning how to use my new OMNI 10 Tablet, but I can't know what I need to install a program on this subject.  I have a HP desktop and drives for laptops that both have CDs. Do I have to buy an external CD drive to install a new program (not app,

  • Maximum size of the data to tiara

    Hello I'm trying to load a 2 GB text file in DIAdem. This causes DIAdem hang and I have to restart the software. Can it supports this size? If Yes, then what is an approximate loading time? My system config is: Windows XP OS 1 GB OF RAM 3 GHz P4 proc

  • I constantly receive the same updates

    I constantly receive the same updates served...  I have download and a few seconds later, Microsoft Updates tells me I need to download the same update again!