QTimer and qmlRegisterType

I think it's time for me to consult the world forum on my problem. It seems so simple and yet I could not find the cause of the problem. I started having problems after you install the SDK version Gold

I use QTimer on stunts.

In my .cpp, I registered the object as:

qmlRegisterType ('my.library', 1, 0, 'QTimer");

In main.qml, I imported as:

import my.library 1.0

and fixed on a label as follows:

attachedObjects:]
{QTimer
ID: timer
property int f: 0
interval: 1000
onTimeout: {}
f += 1;
timerLabel.text = "duration:"+ f; ".  timerLabel is the id of the tag that is fixed QTimer
}
}
]

Thanks for any help!

After trying several scenarios and working on your suggestions, I've finally found what is causing the problem. In the original code, it could save the object and reached the import statement, but he has never run the attachedObjects part.

What I did is I renamed my main.qml in another (timeTrial.qml) and created a new main.qml. Can I access timeTrial.qml through navigationPane. It worked without any code changes.

Can someone give an overview of how's done it?

It goes like this:

CPC (save the object) file-> main.qml-> timeTrial.qml (import my.library 1.0)

Thank you very much!

Tags: BlackBerry Developers

Similar Questions

  • Notifications in headless

    Hi all

    In short duration without a head it can work in the BlackBerry version 10.2.0 10 operating system?

    I use example notifications how to send notifications without head like using 'QTime' and every 12 hours send notifications when close app?

    I have read the documents , but I don't know how to do this?

    Thank you!

    Concerning

    The outbreak of the timer is new in BlackBerry OS 10.3, so you won't be able to use it at the point 10.2.  I will request documentation update for the version to avoid this kind of confusion in the future triggers added in the list.

  • Help me build Chess Clock/Timer

    Hello guys, I want to create chess clock/timer for blackberry app. can you give me sugestions how to create chess clock/timer with QML mode. to create applications for BFB, I can do it!

    Please help me!

    On the QML side simply using two buttons to start and stop each player enough to...

    http://developer.BlackBerry.com/native/reference/Cascades/bb__cascades__button.html

    So for a timer you attach a QTimer and update a label or later something more graphically sophisticated...

    http://developer.BlackBerry.com/native/reference/Cascades/bb__cascades__label.html

    Fire is a good example of use a QTimer in QML with a countdown similar to what you need, I recommend working through it, once you understand it, it should be trivial to adapt it to your needs...

    http://developer.BlackBerry.com/native/documentation/Cascades/dev/signals_slots/signals_slots_create...

  • <>and problems QImage qmlRegisterType

    I put in work of a custom control cascade but my command does not display I register my control in qml qmlRegisterType('com.lib', 1, 0, 'View'); Here are the important codes.

    in the qml file, I call my control as

            View{
                horizontalAlignment: HorizontalAlignment.Center
                verticalAlignment: VerticalAlignment.Center
            }
    

    Constructor for my control

    View::View(Container *parent)
        : CustomControl(parent)
        , m_Image( )
    {
    
        // Create the image view for the handle using the image for
        // the inactive handle
        m_ImageView = ImageView::create()
            .image(m_Image)
            .horizontal(HorizontalAlignment::Center)
            .vertical(VerticalAlignment::Center).preferredSize(400.0, 300.0);
    
        // Create a scrollView for our  view
        m_ScrollView = ScrollView::create(m_ImageView).scrollMode(ScrollMode::Both);
    
        //m_rootContainer->add(m_ImageView);
    
        // Set the root of the custom control.
        setRoot(m_ScrollView);
    
    }
    

    Update for my opinion

    void View::updateImage()
    {
        QImage image;
        tile.load( QString::fromLatin1("app/native/assets/images/t2.png") );
    
        //draw the image
        QImage qImage(400.0, 300.0, QImage::Format_RGB32);
        QPainter painter(&qImage);
        painter.drawImage(0, 0, tile);
        qImage.rgbSwapped();
    
        const bb::ImageData imageData = bb::ImageData::fromPixels(qImage.bits(), bb::PixelFormat::RGBX, 400.0, 300.0, qImage.bytesPerLine());
    
        m_Image = bb::cascades::Image(imageData);
    
        emit imageChanged(m_Image);
    }
    

    Problem solved. It was a problem of getters and setters. found a work around but will need to read the style getters and setters of Qt.

  • Question: Poor quality after rotation and can not play on QTime/RealPlayer

    I use EPA, 11 that I just bought and installed. I imported a file (about 600 MB) .avi created on my camera and then turned after the scaling.  I also applied Smart Fix. Two problems: 1. the quality is distinctly inferior to the original and 2. For editing, I don't have an option to select a format that can be played by Qucktime or Real Player. The published file is only about 110 MB. I'm new on this and can't find the answer yet. Thanks Julienl57

    Return on what asked hunting...

    Read Bill Hunt on a file type as WRAPPER http://forums.adobe.com/thread/440037

    What is a CODEC... a primer http://forums.adobe.com/thread/546811

    What CODEC is inside of this file? http://forums.Adobe.com/thread/440037

    .

    A report with the codec of your file details, use the programs below... a screen capture works well for people to SHOW what you do

    http://forums.Adobe.com/thread/592070?TSTART=30

    .

    For PC http://mediainfo.sourceforge.net/en or http://www.headbands.com/gspot/

    For Mac http://mediainspector.massanti.com/

    And some general reading...

    Http://help.adobe.com/en_US/premiereelements/using/index.html user's Guide online

    -Download PDF page current http://helpx.adobe.com/premiere-elements.html

    Import video http://forums.adobe.com/thread/1065281

    - and http://forums.adobe.com/thread/1112086 of the project settings

    Shared savings & http://forums.adobe.com/thread/1137128

    -Sharing of DVD or BluRay http://forums.adobe.com/thread/1137645

    -Sharing for movies http://forums.adobe.com/thread/1051093

    -Sharing of computer http://forums.adobe.com/thread/1058237

    Steve tutorials... basic training steps are the same for several versions

    -http://forums.adobe.com/thread/537685

    -v11 http://www.amazon.com/Muvipix-Guide-Premiere-Elements-version/dp/1479311200/

    FAQ http://forums.adobe.com/community/premiere_elements/premiere_elements_faq

    ADVICE http://forums.adobe.com/community/premiere_elements/premiere_elements_tips

  • problem with qmlRegisterType

    Hi I have a problem with qmlRegister for the use of an onFarenheitChanged signal for my weather app, when I build and run, has no problem except that when the application starts, the accident with a message like this

    Process 2016309487 (WeatherNow) terminated SIGSEGV code=2 fltno=11 ip=7844f196(/base/usr/lib/qt4/lib/libQtDeclarative.so.4.8.5@_ZN36QDeclarativePropertyValueInterceptorC1Ev+0x711) mapaddr=0014f196. ref=07a4f2f8 bdslot=1
    

    and this is the code

    CPP

    WeatherNowApp::WeatherNowApp()
    {
        QCoreApplication::setOrganizationName("conias media");
        QCoreApplication::setApplicationName("WeatherNow");
    
         qmlRegisterUncreatableType("bb.device", 1, 0, "BatteryChargingState", "");
         qmlRegisterType("My.Library", 1, 0, "QTimer");
         qmlRegisterType("Network.ExternalIP", 1, 0, "ExternalIP");
         qmlRegisterType("Weather.Now", 1, 0, "WeatherNowApp");
         //! [0]
    

    HPP

    #ifndef WEATHERNOWAPP_HPP_
    #define WEATHERNOWAPP_HPP_
    
    #include 
    #include 
    using namespace bb::cascades;
    
    namespace bb
    {
        namespace cascades
        {
            class Application;
        }
    }
    
    class WeatherNowApp : public QObject {
        Q_OBJECT
    
        Q_PROPERTY(bool useFarenheit READ useFarenheit WRITE setUseFarenheit NOTIFY useFarenheitChanged)
    
    public:
    
        WeatherNowApp();
        Q_INVOKABLE void showPhotoInCard(const QString fileName);
    
    Q_SIGNALS:
        void useFarenheitChanged();
    

    and the qml

    import Weather.Now 1.0
    
    attachedObjects: [
    WeatherNowApp {
                onUseFarenheitChanged: {
    
                }
            }
    ]
    

    the qml missing changes to the label and that, but it does not even withouth code in there, so this isn't a problem on the internal code, suggestions?

    SIGSEGV error basically tells you that your application's RAM that does not belong to her or trying to run a class via an invalid pointer method.

    Do I have reason to assume that the WeatherNowApp class is the UI of your main application class? If Yes, I am confused why you would be save with QML, then by attaching to a page in QML. It is not normal to save the UI class main QML in the constructor of this class even with qmlRegisterType().

    I think that maybe what you really do is pass the instance of the main application to QML as a context property. If you try to respond to a signal of your main UI in QML class, then you should do so with the connect() function. Something like this instead:

    WeatherNowApp::WeatherNowApp()
    {
        QCoreApplication::setOrganizationName("conias media");
        QCoreApplication::setApplicationName("WeatherNow");
    
        qmlRegisterUncreatableType("bb.device", 1, 0, "BatteryChargingState", "");
        qmlRegisterType("My.Library", 1, 0, "QTimer");
        qmlRegisterType("Network.ExternalIP", 1, 0, "ExternalIP");
    
        QmlDocument *qml = QmlDocument::create( "asset:///main.qml" ).parent( this );
    
        // ---Make this app object available in QML
        qml->setContextProperty( "app", this );
    }
    
    Page {
       id: myPage
       function onUseFarenheitChanged() {
          if (_WeatherNow.useFarenheit == true)
             weatherDataTemperature.text = Math.round((jsonweather.temp)*1.8+32);
          else {
             weatherDataTemperature.text = Math.round(jsonweather.temp);
          }
       }
       onCreationCompleted: {
          app.useFarenheitChanged.connect(myPage.onUseFarenheitChanged);
       }
    }
    

    BTW, it makes no difference to the code, but you poorly spelled fahrenheit.

  • How can I download itunes and quicktime for windows 7 (64 bit)

    I'm trying to download the most recent, or any other version of itunes on my PC which has Windows 7 (64-bit).  I don't have Quicktime and looking to download or install Itunes or each, quicktime and itunes, separately (everything is better and market).

    The problem is that my PC with Windows 7 is 64-bit and I can't find the right version/s download.

    Facts: firstly - I downloaded itunes and received an error that I need to download QuickTime, then I downloaded quicktime with itunes and and received an error message that qtime was for 32 not 64 bit and I need the 64-bit version.  I can't find the combo of the two download requests or quicktime on its own compatible for windows 7 64 bit.

    Help, please...

    You can find good download here:http://www.apple.com/itunes/download/ you want to check the box at the bottom (64-bit) (circle).

    iTunes and Quicktime are installed as part of the same package.

  • qmlRegisterType problem

    I cannot register a QML type. The first time I did it with the DataModel PrayerModel type I managed to do the work. However, I get errors with the PrayerBBMManager now. It is based on the example of Battambang, but I simplified the entire BBM feature heavily.

    Real errors are:

    Description Resource    Path    Location    Type
    undefined reference to `prayerbbm::PrayerBBMManager::~PrayerBBMManager()'   PrayerJournal       line 86, external location: f:\bbndk\target_10_0_9_2318\qnx6\usr\include\qt4\QtDeclarative\qdeclarativeprivate.h    C/C++ Problem
    
    Description Resource    Path    Location    Type
    undefined reference to `prayerbbm::PrayerBBMManager::PrayerBBMManager(QObject*)'    PrayerJournal       line 82, external location: f:\bbndk\target_10_0_9_2318\qnx6\usr\include\qt4\QtDeclarative\qdeclarativeprivate.h    C/C++ Problem
    
    Description Resource    Path    Location    Type
    undefined reference to `prayerbbm::PrayerBBMManager::staticMetaObject'  PrayerJournal       line 163, external location: f:\bbndk\target_10_0_9_2318\qnx6\usr\include\qt4\QtDeclarative\qdeclarative.h  C/C++ Problem
    
    Description Resource    Path    Location    Type
    undefined reference to `prayerbbm::PrayerBBMManager::staticMetaObject'  PrayerJournal       line 189, external location: f:\bbndk\target_10_0_9_2318\qnx6\usr\include\qt4\QtDeclarative\qdeclarative.h  C/C++ Problem
    

    Here's my PrayerJournal.cpp file:

    #include "PrayerJournal.h"
    #include "prayermodel.h"
    #include "prayerbbm/prayerbbmmanager.h"
    
    #include 
    #include 
    #include 
    
    using namespace bb::cascades;
    using namespace prayerbbm;
    
    PrayerJournal::PrayerJournal(bb::cascades::Application *app)
    : QObject(app)
    {
        qDebug() << "starting PrayerJournal app constructor ";
        QCoreApplication::setOrganizationName("Alliteration Applications");
        QCoreApplication::setOrganizationDomain("http://alliterationapplications.com");
        QCoreApplication::setApplicationName("Prayer Journal");
    
      qmlRegisterType("com.prayerjournal.prayerdata", 1, 0, "PrayerModel");
      qmlRegisterType("com.prayerjournal.prayerbbm", 1, 0, "PrayerBBMManager");
      qDebug() << "Registered PrayerModel and PrayerBBM types for QML";
    
      // Create a QMLDocument and load it, using build patterns.
      QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
      if (!qml->hasErrors()) {
          qDebug() << "QML is error-free! Celebrate!";
      }
      if (qml->hasErrors()) {
          qDebug() << "QML has errors";
      }
    
      //qml->setContextProperty("registrationHandler", registrationHandler);
      AbstractPane *appPage = qml->createRootObject();
      Application::instance()->setScene(appPage);
    
      qDebug() << "Created and initialized main.qml";
    }
    

    Thanks to all that refers to BBM files qml commenting regularly and working backward in this file I can identify the problem happening to qmlRegisterType statement.

    Here's the prayerbbmmanager.h:

    namespace prayerbbm
    {
        /**
         * PrayerBBMManager Description:
         *
         * This manager takes care of registering the application with BBM
         */
        class PrayerBBMManager: public QObject
        {
        Q_OBJECT
    
        public:
            PrayerBBMManager(QObject *parent = 0);
    
            virtual ~PrayerBBMManager();
    

    And the prayerbbmmanager.cpp:

    namespace prayerbbm
    {
        PrayerBBMManager::PrayerBBMManager(QObject *parent) :
                QObject(parent)
        {
             m_uuid = QString::fromUtf8("d8484b8d-bed5-4cde-8c11-462c6a04bc35");
    
             if (mSettings.value("connectToBBM").isNull()) {
                mSettings.setValue("connectToBBM", QVariant(false));
             }
        }
    
        PrayerBBMManager::~PrayerBBMManager()
        {
        }
    

    Any help would be appreciated.

    Yes it could be

    My money is also on the sources of PrayerBBMManager is not THAT MOC would be because they were transferred in a directory that is not referenced in the .pro project file

  • Native of filebrowse using and the cascading Save dialog box

    In my application I need to open file and file save dialog box when a specific button is clicked. I looked at the docs of stunts, but I found that the native options. Tried the native alert dialog, change of filebrowse dialog type. It displays well on Simulator, but could not get any output file that will be used in the Qt code.

    I pass these parameters

    int * num = NULL;

    char * folder [1024];
    dialog_update (alert_dialog);

    to dialog_event_get_filebrowse_filepaths(event,file,num), but it always returns BPS_FAILURE.

    In addition, access_shared is present in the bar-descriptor

    Here is my code:

    //slot function
    void App::fileOpen(){
        //===========================
            dialog_instance_t alert_dialog = 0;
    
            bps_initialize();
    
            dialog_request_events(0);    //0 indicates that all events are requested
    
            if (dialog_create_filebrowse(&alert_dialog) != BPS_SUCCESS) {
                        fprintf(stderr, "Failed to create alert dialog.");
                        return ;
                }
                const char* extensions[] = {"*.*","*.jpg","*.jpeg","*.mp3","*.wav","*.mp4","*.txt","*.doc","*.pdf"};
                int items = 9;
                if(dialog_set_filebrowse_filter(alert_dialog, extensions,items) != BPS_SUCCESS){
                    fprintf(stderr, "Failed to set alert dialog message text.");
                            dialog_destroy(alert_dialog);
                           alert_dialog = 0;
                           return ;
                }
               if( dialog_set_filebrowse_multiselect(alert_dialog,FALSE)!=BPS_SUCCESS){
                   fprintf(stderr, "Failed to set alert dialog message text.");
                                dialog_destroy(alert_dialog);
                               alert_dialog = 0;
                               return ;
               }
    
            if (dialog_show(alert_dialog) != BPS_SUCCESS) {
                fprintf(stderr, "Failed to show alert dialog.");
                dialog_destroy(alert_dialog);
                alert_dialog = 0;
                return ;
            }
    
            int shutdown =0;
            while (!shutdown) {
                bps_event_t *event = NULL;
                bps_get_event(&event, -1);    // -1 means that the function waits
                                              // for an event before returning
    
                if (event) {
                    if (bps_event_get_domain(event) == dialog_get_domain()) {
    
                        int selectedIndex =
                            dialog_event_get_selected_index(event);
                        const char* label =
                            dialog_event_get_selected_label(event);
                        const char* context =
                            dialog_event_get_selected_context(event);
    
                        char **fileArray[]={};
                        int *numFiles = NULL;
                       //
                              if(selectedIndex == 0){
           shutdown = 1;//user press the cancel button on dialog; close the dialog
       }
       else if(selectedIndex == 1){
           if(dialog_event_get_filebrowse_filepaths(event,file,num)!=BPS_SUCCESS){
           fprintf(stderr,"File open fail");
       }
       else{
    
    //debug purposes
           fprintf(stderr,"File array: %d/n",sizeof(file)*1024);
               fprintf(stderr,"Num files: %n",num);
               //fprintf(stderr,"Files int: %d",files);
       }
    
       }
                    }
                }
            }
    
            if (alert_dialog) {
                dialog_destroy(alert_dialog);
            }
            //===========================
    }
    

    Native Subforums have no useful information on this subject. Any help is greatly appreciated

    Hello again, here's the example as promised.

    To use the native filebrowse dialog box, the native code must run in its own thread to prevent the user interface in the Cascades to block. This is achieved by encapsulating all the dialog box code in a class derived from QThread.  The class I wrote is called FileBrowseDialog

    FileBrowseDialog.hpp

    #ifndef FILEBROWSEDIALOG_HPP_
    #define FILEBROWSEDIALOG_HPP_
    
    #include 
    #include 
    #include 
    
    /*
     * The file browse dialog displays a dialog to browse and select
     * files from shared folders on the system.
     */
    class FileBrowseDialog : public QThread
    {
        Q_OBJECT
    
        /*
         * QML property to allow multiple selection
         */
        Q_PROPERTY(bool multiselect READ getMultiSelect WRITE setMultiSelect)
    
        /*
         * QML property to read the selected filenames
         */
        Q_PROPERTY(QVariant filepaths READ getFilePaths)
    
        /*
         * QML property to set or get the file filters. This is an
         * list array variant.
         */
        Q_PROPERTY(QVariant filters READ getFilters WRITE setFilters)
    public:
        /*
         * Ctor and Dtor
         */
        FileBrowseDialog(QObject* parent = 0);
        virtual ~FileBrowseDialog();
    
        /*
         * Exposed to QML to start the run loop which creates and displays the dialog.
         * The dialog is shown until a button is clicked.
         */
        Q_INVOKABLE void show();
    
    public:
        /*
         * Getter for the selected filenames QML property
         */
        QVariant getFilePaths() const;
    
        /*
         * Setter and Getter for the filters QML property
         */
        QVariant getFilters() const;
        void setFilters(QVariant const& value);
    
        /*
         * Getter and Setter for the multiselect QML property
         */
        bool getMultiSelect() const;
        void setMultiSelect(bool value);
    
    signals:
        /*
         * Signal emitted when the OK button has been clicked on the browse dialog
         * The OK button is not enabled unless a file is selected
         */
        void selectionCompleted();
    
        /*
         * Signal emitted when the cancel button has been clicked on the browse dialog
         */
        void selectionCancelled();
    
    protected:
        /*
         * Implements the run loop. Dialog stays open until a button is clicked.
         */
        virtual void run();
    
    protected:
        dialog_instance_t m_dialog;
        bool m_multiSelect;
        QVariantList m_filePaths;
        QVariantList m_filters;
    };
    
    #endif /* FILEBROWSEDIALOG_HPP_ */
    

    FileBrowseDialog.cpp

    #include "FileBrowseDialog.hpp"
    #include 
    #include 
    
    FileBrowseDialog::FileBrowseDialog(QObject* parent)
        : QThread(parent)
        , m_multiSelect(false)
    {
        m_filters.push_back(QString("*.*"));
    }
    
    FileBrowseDialog::~FileBrowseDialog()
    {
    }
    
    void FileBrowseDialog::show()
    {
        if (!isRunning())
        {
            m_filePaths.clear();
            start();
        }
    }
    
    QVariant FileBrowseDialog::getFilePaths() const
    {
        return m_filePaths;
    }
    
    bool FileBrowseDialog::getMultiSelect() const
    {
        return m_multiSelect;
    }
    
    void FileBrowseDialog::setMultiSelect(bool value)
    {
        m_multiSelect = value;
    }
    
    QVariant FileBrowseDialog::getFilters() const
    {
        return m_filters;
    }
    
    void FileBrowseDialog::setFilters(QVariant const& value)
    {
        m_filters = value.toList();
        qDebug() << "filter count: " << m_filters.count();
    }
    
    void FileBrowseDialog::run()
    {
        bps_initialize();
    
        //request all dialog events
        dialog_request_events(0);
        if (dialog_create_filebrowse(&m_dialog) != BPS_SUCCESS)
        {
            qDebug() << "Failed to create file browse dialog.";
            emit selectionCancelled();
            return;
        }
    
        //set the selection filters
        if (m_filters.count() > 0)
        {
            char** ext = (char**)new char[m_filters.count()*sizeof(char*)];
            int i = 0;
            for (QVariantList::iterator it = m_filters.begin(); it != m_filters.end(); ++it, ++i)
            {
                QString filter = it->toString();
                if (!filter.trimmed().isEmpty())
                {
                    int length = (filter.length() + 1) * sizeof(char);
                    ext[i] = new char[length];
                    strncpy(ext[i], filter.toAscii(), length);
                }
            }
            if (dialog_set_filebrowse_filter(m_dialog, (const char**)ext, m_filters.count()) != BPS_SUCCESS)
            {
                qDebug() << "unable to set file browse dialog extensions";
            }
            for (i = 0; i < m_filters.count(); i++)
            {
                delete ext[i];
            }
            delete ext;
        }
    
        if (dialog_show(m_dialog) != BPS_SUCCESS)
        {
            qDebug() << "Failed to show file browse dialog.";
            dialog_destroy(m_dialog);
            m_dialog = 0;
            emit selectionCancelled();
            return;
        }
    
        bool shutdown = false;
        while (!shutdown)
        {
            bps_event_t* event = NULL;
            bps_get_event(&event, -1);    // -1 means that the function waits
            // for an event before returning
    
            if (event)
            {
                if (bps_event_get_domain(event) == dialog_get_domain())
                {
                    //0=ok, 1=cancel
                    int selectedIndex = dialog_event_get_selected_index(event);
    
                    if (selectedIndex == 1)
                    {
                        int count;
                        char** filepaths;
                        if (BPS_SUCCESS == dialog_event_get_filebrowse_filepaths(event, &filepaths, &count))
                        {
                            for (int i = 0; i < count; i++)
                            {
                                qDebug() << "selected file: " << filepaths[i];
                                m_filePaths.push_back(QString(filepaths[i]));
                            }
                            bps_free(filepaths);
                        }
                        emit selectionCompleted();
                    }
                    else
                    {
                        emit selectionCancelled();
                    }
    
                    qDebug() << "Got file browse dialog click";
                    shutdown = true;
                }
            }
        }
    
        if (m_dialog)
        {
            dialog_destroy(m_dialog);
        }
    }
    

    This class derives from QObject (by QThread) which means that it can be used by QML when it exposes properties and signals. The FileBrowseDialog class has 3 properties

    -multiple selection: a Boolean flag indicating if single or multiple selection is allowed

    -filepaths: a read only value that returns the list of files selected

    -Filters: a read/write value is where you can specify one or more filters to file (for example, ".doc", "*.jpg") etc.

    The next part is how you call the FileBrowseDialog through the QML. To do this, we must inform the QML of the FileBrowseDialog page. This is done in the App class via the qmlregistertype code.

    App.cpp

    #include 
    #include 
    #include 
    
    #include "app.hpp"
    #include "FileBrowseDialog.hpp"
    
    using namespace bb::cascades;
    
    App::App()
    {
        qmlRegisterType("Dialog.FileBrowse", 1, 0, "FileBrowseDialog");
        QmlDocument *qml = QmlDocument::create("main.qml");
        qml->setContextProperty("cs", this);
    
        AbstractPane *root = qml->createRootNode();
        Application::setScene(root);
    }
    

    The QML is now ready to be able to use the FileBrowseDialog. The example below is a page complete qml which has a button and a label. When we click on the FileBrowseDialog button is open, and all selected files will appear in the label.

    Main.QML

    import bb.cascades 1.0
    import Dialog.FileBrowse 1.0
    
    Page {
        content: Container {
            Label { id: filebrowseDialogLabel }
            Button {
                text : "File Browse Dialog"
                onClicked: {
                    filebrowseDialog.show();
                }
            }
            attachedObjects: [
                FileBrowseDialog {
                    id: filebrowseDialog
                    multiselect : true
                    filters : ["*.doc","*.jpg","*.txt"]
                    onSelectionCompleted: {
                        if(filebrowseDialog.filepaths.length>0)
                            filebrowseDialogLabel.text = filebrowseDialog.filepaths[0];
                        else
                            filebrowseDialogLabel.text = "no file selected";
                    }
                    onSelectionCancelled: {
                        filebrowseDialogLabel.text = "file browse dialog was cancelled";
                    }
                }
            ]
        }
    }
    

    And it's pretty much just invoke the native dialog file navigation in stunts. Please note save the file would follow a similar model, but I found that this dialog box was not particularly useful because it displays only a simple dialogbox with a text file name entry.

    See you soon

    Swann

  • ListView with TextField inside the component and requestFocus()

    Hello

    I'm trying to implement the logical: when the page with ListView is indicated - start editing (see the keyboard) in the field of specific text that is part of the agenda of the ListView.

    TextField.requestFocus () works very well if it is called some time later, after loading the page (assuming that when ListView load model and created the UI elements).

    How to identify when requestFocus() is success? onCreationCompleted for TextField/ListView does not work.

    It can be done with QTimer but I want to keep it as a backup plan.

    Thank you

    Can you try to add to your Page (or your ListView):
    attachedObjects:]
    {RenderFence}
    raised: true
    onReached: textFieldName.requestFocus)
    }
    ]

  • Issue of RouteInvoker and LocationInvoker with 10.2

    Hey guys,.

    I'm trying to update my application for 10.2 and for a reason that my RouteInvoker function seems to not work with the new OS.  Here's my QML code for the function:

    import bb.cascades 1.0import PersistenObjectsLib 1.0import QtMonility.sensors 1.2import bb.cascades.maps 1.0import QtMobilitySubset.location 1.1import bb.platform 1.0import bb.data 1.0import bb.system 1.0
    
    Tab {
            title: qsTr("Saved Locations") + Retranslate.onLanguageChanged
            imageSource: "asset:///images/url.png"
            Page {
                onCreationCompleted: {
                    _app.setStorageLocation.App.StoreInFile;
                }
    
                actions: [
                    ActionItem {
                        title: qsTr("Get Route") + Retranslate.onLocaleOrLanguageChanged
                        imageSource: "asset:///images/ic_nav_to.png"
                        ActionBar.placement: ActionBarPlacement.OnBar
                        onTriggered: routeInvoker.go()
                    },
                    ActionItem {
                        title: qsTr("See Map") + Retranslate.onLocaleOrLanguageChanged
                        imageSource: "asset:///images/pin.png"
                        ActionBar.placement: ActionBarPlacement.OnBar
                        onTriggered: locationInvoker.go()
                    }
    
                ]
                titleBar: TitleBar {
                    title: qsTr("Saved Locations") + Retranslate.onLanguageChanged
                }
    
                    ListView {
                        function getApp() { // 1
                            return _app
                        }
    
                        id: listView
                        property string selectedItemID
                        dataModel: _app.dataModel
    
                        listItemComponents: [ // 2
    
                            ListItemComponent {
                                type: "item"
                                StandardListItem {
                                    id: rootItem // 3
                                    title: ListItemData.name
                                    description: ListItemData.description
                                    status: ListItemData.datefield
                                    imageSource: "asset:///images/pin.png"
    
                                    contextActions: [
                                        ...
                                    ]
                                }
                            }
                        ]
                        onTriggered: {
                            clearSelection()
                            select(indexPath)
    
                            locationInvoker.locationLatitude = dataModel.data(indexPath).lat
                            locationInvoker.locationLongitude = dataModel.data(indexPath).lon
                            routeInvoker.endLatitude = dataModel.data(indexPath).lat
                            routeInvoker.endLongitude = dataModel.data(indexPath).lon
                        }
                    }
                }
                attachedObjects: [
                    LocationMapInvoker {
                        id: locationInvoker
    
                        centerLatitude: 27.74949
                        centerLongitude: -97.41918
    
                    },
                    RouteMapInvoker {
                        id: routeInvoker
    
                        // Use fixed coordinates for start position ...
                        // Note: This does not work with current BB10 version but will work with future ones
                        startLatitude: 42.814513
                        startLongitude: -73.94206
    
                        // ... and center the map view around them.
                        centerLatitude: startLatitude
                        centerLongitude: startLongitude
                    }
                ]
                //! [0]
            }
        }
    

    Here are my main CPP:

    #include "app.hpp"
    #include "ActiveFrame.h"
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    #include 
    #include 
    
    using ::bb::cascades::Application;
    // this allows us to write "Application"
    // instead of "bb::cascades::Application"
    
    void myMessageOutput(QtMsgType type, const char* msg) {
        Q_UNUSED(type);
       fprintf(stdout, "%s\n", msg);
       fflush(stdout);
    }
    // main() is the entry point of the application. It will be called by the
    // operating system when you start the application. You should never call this
    // yourself.
    Q_DECL_EXPORT int main(int argc, char **argv)
    {
    
        qmlRegisterType("bb.platform", 1, 0, "RouteMapInvoker");
            bb::data::DataSource::registerQmlTypes();
            qmlRegisterType("bb.platform", 1, 0, "LocationMapInvoker");
            bb::data::DataSource::registerQmlTypes();
        // "Application" is the BB cascades class that handles interaction the
        // with BB10 operating system.
        Application app(argc, argv);
    
    #ifndef QT_NO_DEBUG
       qInstallMsgHandler(myMessageOutput);
       #endif
    
        QTranslator translator;
            QString locale_string = QLocale().name();
            QString filename = QString("App_%1").arg(locale_string);
            if (translator.load(filename, "app/native/qm")) {
                app.installTranslator(&translator);
            }
    
        // Register this type so qml can refer to enums and other symbols
        // declared in the App class.
        qmlRegisterType("PersistentObjectsLib", 1, 0, "App");
    
        // Create an instance of App on the stack. App's
        // constructor registers itself with Application object using setScene().
        // See app.cpp
        app.setCover(new ActiveFrame());
        App mainApp;
    
        // Start the application event loop (run-loop).
        return Application::exec();
    
        // When the loop is exited the Application deletes the scene which deletes
        // all its children (per Qt rules for children)
    }
    

    what Miss me?  or what I need to add?  It worked very well in 10.1.

    Thanks in advance for your help.  Tastes and solutions will give answers.

    Solution was to change:

    attachedObjects:]
    {LocationMapInvoker}
    ID: locationInvoker

    centerLatitude: 27.74949
    centerLongitude:-97.41918

    },
    {RouteMapInvoker}
    ID: routeInvoker

    Use fixed coordinates for the starting position.
    Note: This does not work with the current version of BB10 but will work with future generations
    startLatitude: 42.814513
    startLongitude:-73.94206

    ... and Center the view card around them.
    centerLatitude: startLatitude
    centerLongitude: startLongitude
    }
    ]

    TO:

    attachedObjects:]
    {LocationMapInvoker}
    ID: locationInvoker

    },
    {RouteMapInvoker}
    ID: routeInvoker

    }
    ]

  • Why connecttng signals and slots of an element of action gets segfault

    I add an action item to a page. For some reasong I had to disconnect the item, delete and re-create, and then reconnect it. But I am getting exception when I try to pull the plug. If I omit the disconnection then I get exception when connecting. My code is below

      if(addAllRules)
        {
            disconnect(addAllRules,SIGNAL(triggered()),this,SLOT(onTriggeredAddRuleActionAllRules()));
            delete(addAllRules);
        }
        addAllRules =  ActionItem::create().title("Add Rule").enabled(true);
        allRulesPage->addAction(addAllRules, ActionBarPlacement::OnBar);
        connect(addAllRules,SIGNAL(triggered()),this,SLOT(onTriggeredAddRuleActionAllRules()));
    

    Have you tried cleaning and reconstruction project?

    You will need to find the exact location of the crash using a debugger or newspapers, or analyze a dump core after accident.

    This can also occur due to memory corruption. If the memory is damaged from somewhere, the accident can happen in completely independent place. In this case, try commenting on most of the features of the application until the QTimer started working restaurant then step by step.

  • Writing EXIF data (and how to define the side of the photo)

    Anyone had luck writing EXIF data in photos? Reading EXIF data are fairly easy, as demonstrated by "photobomber. Writing EXIF data seems to be more painful, however.

    In particular, I'm trying the face value of the photo.  I found mention on the web page of its existence in EXIF, with the code:

    0 x 4746

    That said, when I check the exif - tag.h, apparently not be listed.

    It is clear to me that this is a deal breaker or not.  The tags are listed in the exif - tag.h the only ones that can be used? Or are they simply definitions of convenience tag codes most commonly used?

    Thank you

    Daniel

    Incase others are reading this in the future and ask yourself how: my conclusion is that the best way to define metadata such as:

    -Photo rating

    -Tags

    -Description

    ... does NOT use EXIF.  On the contrary, it seems that XMP is a much better choice:

    http://en.Wikipedia.org/wiki/Extensible_Metadata_Platform

    Ideally, BB10 comes with the XMP library, and it can be easily added to your project. (right-click on the project node in "Project Explorer", go to the context menu item 'Configure', then 'add the library')

    Here's the code I added bo my main.cpp:

    //-----------------------------------------------------------------------------
    // XMP
    //-----------------------------------------------------------------------------
    
    // Must be defined to instantiate template classes
    #define TXMP_STRING_TYPE std::string
    
    // Must be defined to give access to XMPFiles
    #define XMP_INCLUDE_XMPFILES 1
    
    #define UNIX_ENV 1
    
    #include "xmp/XMP.incl_cpp"
    #include "xmp/XMP.hpp"
    
    #include 
    #include 
    
    using namespace std;
    
    //-----------------------------------------------------------------------------
    

    ... and here's what I added to the .h file that I wanted to use XMP in: (it does not include the XMP.incl_cpp at the top of the notice)

    //-----------------------------------------------------------------------------
    // XMP
    //-----------------------------------------------------------------------------
    
    #define TXMP_STRING_TYPE std::string
    #define XMP_INCLUDE_XMPFILES 1
    #define UNIX_ENV 1
    
    #include "xmp/XMP.hpp"
    
    #include 
    #include 
    
    using namespace std;
    
    //-----------------------------------------------------------------------------
    

    And finally, here's a big copy and paste part of the key code that I adapted to the code example in the XMP SDK I downloaded separately for read/write some common tags.  Feel free to use this code in your own applications, or to adapt it, if that's helpful.

    int ImageViewContainer::xmpWrite()
    {
        qDebug() << "xmpWrite()";
    
        string filename = file.toStdString();
    
        if (!SXMPMeta::Initialize())
        {
            qDebug() << "XMP: An error occurred initializing XMP.";
            return -1;
        }
    
        XMP_OptionBits options = 0;
    
        #if UNIX_ENV
            options |= kXMPFiles_ServerMode;
        #endif
    
        if (!SXMPFiles::Initialize(options))
        {
            qDebug() << "XMP: An error occurred initializing SXMPFiles.";
            return -1;
        }
    
        try
        {
            // Try using the smart handler.
            XMP_OptionBits opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUseSmartHandler;
    
            bool ok;
            SXMPFiles myFile;
    
            // Open the file.
            ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
            if (!ok)
            {
                qDebug() << "XMP: No smart handler available for " + file + ". Trying packet scanning.";
    
                // Now try using packet scanning.
                opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUsePacketScanning;
                ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
            }
    
            // If the file is open then read the metadata.
            if (ok)
            {
                qDebug() << "XMP: Opened: " << file;
    
                // Create the xmp object and get the xmp data.
                SXMPMeta meta;
                myFile.GetXMP(&meta);
    
                // Should we be doing this?
                meta.SetProperty(kXMP_NS_XMP, "CreatorTool", "Updated by PhotoStar", 0);
    
                int ratingToSet = rating;
                if (ratingToSet == -1) { ratingToSet = 0; }
                meta.SetProperty(kXMP_NS_XMP, "Rating", QString::number(ratingToSet).toStdString(), 0);
    
                // Required before we can call other functions that refer to this namespace
                // without getting an exception.
                std::string tmp;
                meta.RegisterNamespace("http://ns.microsoft.com/photo/1.0/", "MicrosoftPhoto", &tmp);
    
                if (ratingToSet == -1)
                {
                    meta.DeleteProperty("http://ns.microsoft.com/photo/1.0/", "Rating");
                }
                else
                {
                    int microsoftRating;
    
                    // Mapping:
                    // xmp:Rating=1 -> MicrosoftPhoto:Rating=1
                    // xmp:Rating=2 -> MicrosoftPhoto:Rating=25
                    // xmp:Rating=3 -> MicrosoftPhoto:Rating=50
                    // xmp:Rating=4 -> MicrosoftPhoto:Rating=75
                    // xmp:Rating=5 -> MicrosoftPhoto:Rating=100
    
                    if (ratingToSet == 1)
                    {
                        microsoftRating = 1;
                    }
                    else
                    {
                        microsoftRating = (ratingToSet - 1) * 25;
                    }
    
                    qDebug() << "MicrosoftPhoto:Rating: " << QString::number(microsoftRating);
                    meta.SetProperty("http://ns.microsoft.com/photo/1.0/", "Rating", QString::number(microsoftRating).toStdString(), 0);
                }
    
                // Delete old tags. (?)
                meta.DeleteProperty(kXMP_NS_DC, "subject");
    
                // Tags
                for (int i = 0; i < tags.size(); ++i)
                {
                    string value = tags[i].toStdString();
                    meta.AppendArrayItem(kXMP_NS_DC, "subject", kXMP_PropArrayIsOrdered, value, 0);
                    //meta.SetArrayItem(kXMP_NS_DC, "subject", i + 1, value, 0);
                }
    
                meta.SetLocalizedText(kXMP_NS_XMP, "Description", "en", "en-US", description.toStdString(), NULL);
    
                // Update the Metadata Date
                XMP_DateTime updatedTime;
    
                // Get the current time. This is a UTC time automatically adjusted for the local time.
                SXMPUtils::CurrentDateTime(&updatedTime);
                //if (meta.DoesPropertyExist(kXMP_NS_XMP, "MetadataDate"))
                //{
                    meta.SetProperty_Date(kXMP_NS_XMP, "MetadataDate", updatedTime, 0);
                //}
    
                // Now update alt-text properties
                //meta.SetLocalizedText(kXMP_NS_DC, "title", "en", "en-US", "Kind of pretty");
    
                // For debugging
                if (false)
                {
                    // Serialize the packet and write the buffer to a file.
                    // Let the padding be computed and use the default linefeed and indents without limits.
                    string metaBuffer;
                    meta.SerializeToBuffer(&metaBuffer, 0, 0, "", "", 0);
    
                    //qDebug() << QString::fromStdString(metaBuffer);
    
                    // Write the packet to a file as RDF
                    writeRDFToFile(&metaBuffer, filename + "_XMP_RDF.txt");
                }
    
                // Check we can put the XMP packet back into the file.
                if (myFile.CanPutXMP(meta))
                {
                    // If so then update the file with the modified XMP.
                    myFile.PutXMP(meta);
                }
                else
                {
                    // Silent for now. TODO: Should this be indicated in
                    // the UI somehow?
                    qDebug() << "XMP: Can't write to file.";
                }
    
                // Close the SXMPFile. This *must* be called. The XMP is not actually written and the
                // disk file is not closed until this call is made.
                myFile.CloseFile();
            }
            else
            {
                qDebug() << "XMP: Unable to open " << file;
            }
        }
        catch(XMP_Error & e)
        {
            qDebug() << "XMP ERROR: " << QString::fromStdString(e.GetErrMsg());
        }
    
        // Terminate the toolkit
        SXMPFiles::Terminate();
        SXMPMeta::Terminate();
    
        return 0;
    }
    
    int ImageViewContainer::xmpRead()
    {
        qDebug() << "xmpRead()";
    
        string filename = file.toStdString();
    
        if (!SXMPMeta::Initialize())
        {
            qDebug() << "XMP: An error occurred initializing XMP.";
            return -1;
        }
    
        XMP_OptionBits options = 0;
    
        #if UNIX_ENV
            options |= kXMPFiles_ServerMode;
        #endif
    
        if (!SXMPFiles::Initialize(options))
        {
            qDebug() << "XMP: An error occurred initializing SXMPFiles.";
            return -1;
        }
    
        try
        {
            // Try using the smart handler.
            XMP_OptionBits opts = kXMPFiles_OpenForRead | kXMPFiles_OpenUseSmartHandler;
    
            bool ok;
            SXMPFiles myFile;
    
            // Open the file.
            ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
            if (!ok)
            {
                qDebug() << "XMP: No smart handler available for " + file + ". Trying packet scanning.";
    
                // Now try using packet scanning.
                opts = kXMPFiles_OpenForUpdate | kXMPFiles_OpenUsePacketScanning;
                ok = myFile.OpenFile(filename, kXMP_UnknownFile, opts);
            }
    
            // If the file is open then read the metadata.
            if (ok)
            {
                qDebug() << "XMP: Opened: " << file;
    
                // Create the xmp object and get the xmp data.
                SXMPMeta meta;
                myFile.GetXMP(&meta);
    
                bool exists;
    
                // Stores the value for the property.
                string value;
    
                // XMP Rating
                exists = meta.GetProperty(kXMP_NS_XMP, "Rating", &value, NULL);
                if (exists)
                {
                    rating = QString::fromStdString(value).toInt(&ok);
                    if (!ok)
                    {
                        rating = -1;
                    }
                }
                else
                {
                    rating = -1;
                }
    
                // Microsoft Rating (only look for this if xmp:Rating is missing)
                if (rating == -1)
                {
                    // Required before we can call other functions that refer to this namespace
                    // without getting an exception.
                    std::string tmp;
                    meta.RegisterNamespace("http://ns.microsoft.com/photo/1.0/", "MicrosoftPhoto", &tmp);
    
                    exists = meta.GetProperty("http://ns.microsoft.com/photo/1.0/", "MicrosoftPhoto:Rating", &value, NULL);
                    //exists = meta.GetProperty(kXMP_NS_XMP, "Rating", &value, NULL);
                    if (exists)
                    {
                        rating = QString::fromStdString(value).toInt(&ok);
                        if (!ok)
                        {
                            rating = -1;
                        }
                        else
                        {
                            // The Microsoft rating is 0, 25, 50, 75, 100.
                            rating /= 25;
                        }
                    }
                    else
                    {
                        rating = -1;
                    }
                }
    
                value.clear();
    
                qDebug() << "XMP Rating: " << rating;
    
                // Tags
                tags.clear();
                int arraySize = meta.CountArrayItems(kXMP_NS_DC, "subject");
                for (int i = 1; i <= arraySize; i++)
                {
                    meta.GetArrayItem(kXMP_NS_DC, "subject", i, &value, 0);
                    qDebug() << "XMP Tag[" << i << "]: " << QString::fromStdString(value);
                    tags.append(QString::fromStdString(value));
                }
    
                value.clear();
    
                // Description
                meta.GetLocalizedText(kXMP_NS_XMP, "Description", "en", "en-US", NULL, &value, NULL);
                description = QString::fromStdString(value);
                qDebug() << "XMP Description: " << description;
    
                timestamp = QDateTime();
                XMP_DateTime updatedTime;
                // Get the current time. This is a UTC time automatically adjusted for the local time.
                SXMPUtils::CurrentDateTime(&updatedTime);
                if (meta.DoesPropertyExist(kXMP_NS_XMP, "MetadataDate"))
                {
                    meta.GetProperty_Date(kXMP_NS_XMP, "MetadataDate", &updatedTime, 0);
                    if (updatedTime.hasDate)
                    {
                        if (updatedTime.hasTime)
                        {
                            timestamp = QDateTime(QDate(updatedTime.year, updatedTime.month, updatedTime.day), QTime(updatedTime.hour, updatedTime.minute, updatedTime.second));
                        }
                        else
                        {
                            timestamp = QDateTime(QDate(updatedTime.year, updatedTime.month, updatedTime.day), QTime(0, 0, 0));
                        }
                    }
                }
    
                // Close the SXMPFile. The resource file is already closed if it was
                // opened as read only but this call must still be made.
                myFile.CloseFile();
            }
            else
            {
                qDebug() << "XMP: Unable to open " << file;
            }
        }
        catch(XMP_Error & e)
        {
            qDebug() << "XMP ERROR: " << QString::fromStdString(e.GetErrMsg());
        }
    
        // Terminate the toolkit
        SXMPFiles::Terminate();
        SXMPMeta::Terminate();
    
        return 0;
    }
    

    Note that the code above makes use of some class member variables:

        int rating;
        QList tags;
        QString description;
        QDateTime timestamp;
    

    One final note: there is a code that deals with the MicrosoftPhoto:Rating XMP tag. It's because I'm on Windows and I noticed that if you click on a photo in Windows Explorer, it allows you to display/change some meta (such as star ratings) data directly in Explorer. When you do so, it sets the MicrosoftPhoto:Rating tag (as well as the tag xmp:Rating, I believe). Once, he put that, if your application updates the xmp:Rating tag but don't update the MicrosoftPhoto:Rating tag and the file returns on Windows, then he continues to use the old notation before your update app. (he seems to ignore xmp:Rating if MicrosoftPhoto:Rating is present)

  • qmlRegisterType - Main Class?

    I am trying to record a signal that I created in the main class of the application;

    Q_SIGNALS:
        void completed(const int ®Success, const QString &loginUsername);
    

    I added this to the app.cpp;

    qmlRegisterType("Core.TheApp", 1, 0, "App");
    

    App is the main class file and is defined by

    class App : public QObject
    

    I now have in my QML file.

    import Core.TheApp 1.0
    

    And I'm not trying to call it as follows;

     attachedObjects: [    
    
            App {
              onCompleted {
    //Do stuff
    }
    
            }
    
    ]
    

    However, I get an EXCEPTION of NULL POINTER.

    Not very well what to do here thank you

    What you try to do will look something like this...

    import bb.cascades 1.0
    
    NavigationPane {
    
        Page {
    
        }
    
        onCreationCompleted: {
            _app.completed.connect(outputBoo);
        }
    
        function outputBoo(success, username) {
            console.debug("Boo!");
        }
    
    }
    

    Where _app is defined in applicationui.cpp and passed as a property...

        QmlDocument *qml = QmlDocument::create("asset:///main.qml")
            .parent(this)
            .property("_app", this);
    

    [Edit] Get rid of all the lines you wrote that they are not necessary, apart from the obvious signal.

  • QTimer connect misfortunes on Z10

    Hello

    I have an application that uses the QTimer class to plan stuff. It allows to set the interval in seconds / minutes / hours.

    This works very well in the Simulator, but fails in some(many?) Z10.

    An app update released today, which allows logging.

    2 people tested and gave newspapers. 1 guy blackberry Support confirmed to me that setting the timer interval to
    seconds doesn't work, but setting say works for 1 minute.
    However, a customer has confirmed that neither works for him.

    Provided by the two newspapers, it resembles QTimer connection with callback fails sometimes

    This is the code I am using

    If (interval_timer == 0) {/ / allocate and configure the timer once}
    interval_timer = new QTimer();

    bool connected = false;
    Q_ASSERT (connected = QObject::connect (interval_timer, SIGNAL (timeout ()), this, SLOT (changeWallpaper()));)

    Log2 ("connected: ' related);
    }

    The timer eventually gets set up correctly (interval and isActive) but because registration reminder is not called

    Reminder slot is defined as follows:

    Sub ChangeWallpaper Q_SLOT (bool is_next_clicked = true);

    Now, I think the problem is the use of the default settings, but it works every time in the Simulator.

    Someone would be willing to test my application in a Z10? I do not have a camera.

    I can create two bars before and after correction. (I guess we can push a file in output mode bar in the device).

    Any help would be appreciated as app approvals can take a long time.

    Thank you

    Hello

    Q_ASSERT (connected = QObject::connect (interval_timer, SIGNAL (timeout ()), this, SLOT (changeWallpaper()));)

    This line will be omitted when compiling in release mode and the signal will not be connected. Try to replace it with:

    connected = QObject::connect (interval_timer, SIGNAL (timeout ()), this, SLOT (changeWallpaper()));

    Q_ASSERT (connected);

Maybe you are looking for

  • Impossible to import all bookmarks in the IE 11, only some. How to do it.

    When you import IE 9 or 11 IE only a few bookmarks are imported. Why? The format for the imported bookmarks has folders alphabetically with individual bookmarks. The desire of records that are in front of individual bookmarks.

  • videos of 50i are interpreted as 25i on FCPX

    Hello I have a Samsung hmx - t10 cam recorder that shoot Full HD 1080i (50i) When I import the files on Final cut pro X it shows 25i and I don't understand why? I create a new project and add files when exporting am not able to choose 50i (like the s

  • CRIO-9073 is compatible with LabVIEW 8.5.1?

    I just got a cRIO-9073 and a cRIO-9074. When I set up, both of them appear correctly in MAX. When I add them to a project LabVIEW, the cRIO-9073 does not show the target FPGA. The cRIO-9074 shows. I'm using LabVIEW 8.5.1, is compatible with the cRIO-

  • Windows media player problems

    I downloaded a movie with utorrent.  I was not able to watch it on Windows Media Player.  I can only hear it.  I was our VLC media player.  It is a lot of work but still impossible to burn to CD.  Any suggestions?

  • error 0xc19a0007

    Has anyone else has this error message and resolved? Please, I'm out of solutions Printer c6380 error 0xc19a0007