Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Trying to populate values on my calendar widget
Forum Updated to NodeBB v4.3 + New Features

Trying to populate values on my calendar widget

Scheduled Pinned Locked Moved General and Desktop
11 Posts 3 Posters 2.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    Please enclose your code with coding tags (one @ a the beginning and one at the end) otherwise is very difficult to read it

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mansi
      wrote on last edited by
      #3

      Hi,

      I solved it by myself :) thanks a lot for your reply :)

      Had another issue.
      Can gif images work on Qt GUI application ?
      I am actually trying to make animated image work but it isn't working, but it works when I use Qt quick application.
      Is it even possible to make it work in Qt GUI ??

      thanks a lot in advance,
      Mansi

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #4

        Do you mean an animated gif ? IIRC you can use QMovie for that

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mansi
          wrote on last edited by
          #5

          @
          #include "guianimation.h"

          #include <QApplication>
          #include <QMovie>
          #include <qmovie.h>
          #include <QtWidgets>
          #include <QLabel>

          int main(int argc, char *argv[])
          {

          QApplication a(argc, argv);
          

          QLabel *label= new QLabel;
          QMovie *movie = new QMovie;

             movie->setFileName("movie1.gif");
          
             // label->setFixedSize(100,100);
             label->setMovie(movie);
             movie->start();
          
             label->show();
          

          guianimation w;
          w.show();

          return a.exec&#40;&#41;;
          

          }
          @

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #6

            Is there any problem with the code ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mansi
              wrote on last edited by
              #7

              no problem with the code. It builds fine but when i run it .. animation doesnt work on my tab.
              I used this extra line in my main program Q_IMPORT_PLUGIN(qgif)
              and some changes in .pro file. This is how my .pro file looks
              @#-------------------------------------------------

              Project created by QtCreator 2013-08-28T16:04:07

              #-------------------------------------------------

              QT += core gui

              greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

              TARGET = guianimation
              TEMPLATE = app
              QTPLUGIN += qgif

              SOURCES += main.cpp
              guianimation.cpp

              HEADERS += guianimation.h

              FORMS += guianimation.ui

              CONFIG += mobility

              MOBILITY =

              RESOURCES +=
              movie2.qrc

              #CONFIG += static

              #QTPLUGIN += qgif

              OTHER_FILES +=
              android/version.xml
              android/res/values-id/strings.xml
              android/res/values-nl/strings.xml
              android/res/values-ru/strings.xml
              android/res/values-zh-rCN/strings.xml
              android/res/values-nb/strings.xml
              android/res/values-rs/strings.xml
              android/res/values-zh-rTW/strings.xml
              android/res/values-fa/strings.xml
              android/res/values-ja/strings.xml
              android/res/values-pl/strings.xml
              android/res/values-ms/strings.xml
              android/res/values-fr/strings.xml
              android/res/values-ro/strings.xml
              android/res/values-de/strings.xml
              android/res/layout/splash.xml
              android/res/values-it/strings.xml
              android/res/values-es/strings.xml
              android/res/values/libs.xml
              android/res/values/strings.xml
              android/res/values-el/strings.xml
              android/res/values-et/strings.xml
              android/res/values-pt-rBR/strings.xml
              android/AndroidManifest.xml
              android/src/org/qtproject/qt5/android/bindings/QtActivity.java
              android/src/org/qtproject/qt5/android/bindings/QtApplication.java
              android/src/org/kde/necessitas/ministro/IMinistro.aidl
              android/src/org/kde/necessitas/ministro/IMinistroCallback.aidl

              win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../Qt5.1.0/5.1.0/android_armv7/plugins/imageformats/release/ -lqgif
              else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../Qt5.1.0/5.1.0/android_armv7/plugins/imageformats/debug/ -lqgif
              else:unix: LIBS += -L$$PWD/../../../Qt5.1.0/5.1.0/android_armv7/plugins/imageformats/ -lqgif

              INCLUDEPATH += $$PWD/../../../Qt5.1.0/5.1.0/android_armv7/plugins/imageformats
              DEPENDPATH += $$PWD/../../../Qt5.1.0/5.1.0/android_armv7/plugins/imageformats
              @
              when I build it.. I am getting these two errors " /home/manasi/workspace/guianimation/guianimation/main.cpp:18: error: undefined reference to 'qt_static_plugin_lqgif()' " and " :-1: error: collect2: error: ld returned 1 exit status " .
              I assume there is a plugin "qgif" which is not found. I tried installing it but couldnt find it. The library file libqgif.so is there in the Qt directory.
              Not sure how to debug it.. can you please help me ? :)

              Regards,
              Mansi

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #8

                QTPLUGIN is used when you want to link against a static plugin which AFAIK is not what you are doing

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • raven-worxR Offline
                  raven-worxR Offline
                  raven-worx
                  Moderators
                  wrote on last edited by
                  #9

                  you don't need to specify them in your PRO file using the QTPLUGIN variable.
                  Qt automatically reads them from the plugins directory.

                  E.g. <QT>/plugins/imageformats/qgif.dll
                  (exact path is depending on your Qt version)

                  Also you need to deploy the plugins with your application (in the correct sub-folder!

                  --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                  If you have a question please use the forum so others can benefit from the solution in the future

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mansi
                    wrote on last edited by
                    #10

                    Hello,

                    I am actually confused here... I assume there is a difference between plugin and a library... there is something called as libqgif.so which is a library and a plugin qgif. I think the .so file has the plugin qgif.
                    And yes the library is there in the same path as you mentioned.

                    My Qt is built dynamically and im trying to use a static plugin.. is that an issue ? Not able to figure out when you say deploy plugin with application.. what do you exactly mean by that ?? can you please elaborate....

                    Thanks a lot in advance,
                    Mansi

                    1 Reply Last reply
                    0
                    • raven-worxR Offline
                      raven-worxR Offline
                      raven-worx
                      Moderators
                      wrote on last edited by
                      #11

                      [quote author="mansi" date="1377834213"]
                      My Qt is built dynamically and im trying to use a static plugin.. is that an issue ? [/quote]
                      yes it is! if you want to use Qt in a static manner you must have also built Qt itself statically.
                      Once you've built Qt statically read this about "static plugins":http://qt-project.org/doc/qt-4.8/plugins-howto.html#static-plugins.

                      [quote author="mansi" date="1377834213"]
                      Not able to figure out when you say deploy plugin with application.. what do you exactly mean by that ?? can you please elaborate....
                      [/quote]
                      This is only relevant when you deploy your application with dynamic linked libraries of course. For "deploying to windows":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html for example.

                      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                      If you have a question please use the forum so others can benefit from the solution in the future

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved