Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. picture with a blinking effect
Qt 6.12 LTS is out! See what's new in the release blog

picture with a blinking effect

Scheduled Pinned Locked Moved Unsolved General and Desktop
16 Posts 3 Posters 2.7k Views
  • 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.
  • N najlou

    Hi all
    i have enabled a camera in a scrollarea but i would like to add this picture with a blinking effect like i can do please
    live-stream-camera-shape-concept-260nw-1725106453-removebg-preview.png

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #2

    @najlou What about animated GIF?

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    N 1 Reply Last reply
    0
    • jsulmJ jsulm

      @najlou What about animated GIF?

      N Offline
      N Offline
      najlou
      wrote on last edited by
      #3

      @jsulm yes good idea but how ?

      jsulmJ JoeCFDJ 2 Replies Last reply
      0
      • N najlou

        @jsulm yes good idea but how ?

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #4

        @najlou Take a look at https://stackoverflow.com/questions/24592918/gif-image-in-qlabel

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        N 1 Reply Last reply
        0
        • jsulmJ jsulm

          @najlou Take a look at https://stackoverflow.com/questions/24592918/gif-image-in-qlabel

          N Offline
          N Offline
          najlou
          wrote on last edited by najlou
          #5

          @jsulm can i put a gif on the same scrollarea as the camera?
          to have something like this images.jpg

          jsulmJ 1 Reply Last reply
          0
          • N najlou

            @jsulm can i put a gif on the same scrollarea as the camera?
            to have something like this images.jpg

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #6

            @najlou Sure

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            N 2 Replies Last reply
            0
            • jsulmJ jsulm

              @najlou Sure

              N Offline
              N Offline
              najlou
              wrote on last edited by
              #7

              @jsulm thanks alot

              1 Reply Last reply
              0
              • N najlou

                @jsulm yes good idea but how ?

                JoeCFDJ Offline
                JoeCFDJ Offline
                JoeCFD
                wrote on last edited by
                #8

                @najlou One simple way to do it is: create two images and toggle them in a qlabel with timer.

                1 Reply Last reply
                0
                • jsulmJ jsulm

                  @najlou Sure

                  N Offline
                  N Offline
                  najlou
                  wrote on last edited by najlou
                  #9

                  @jsulm please I added the image but when I activate the camera it will be hidden by the camera

                  jsulmJ 1 Reply Last reply
                  0
                  • N najlou

                    @jsulm please I added the image but when I activate the camera it will be hidden by the camera

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    @najlou I did not say how you added the image...

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    N 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @najlou I did not say how you added the image...

                      N Offline
                      N Offline
                      najlou
                      wrote on last edited by
                      #11

                      @jsulm i added with label and i put in the scrollarea

                      jsulmJ 1 Reply Last reply
                      0
                      • N najlou

                        @jsulm i added with label and i put in the scrollarea

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #12

                        @najlou Can you post the code where you set up everything?

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        N 1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          @najlou Can you post the code where you set up everything?

                          N Offline
                          N Offline
                          najlou
                          wrote on last edited by
                          #13

                          @jsulm
                          QString filename1=QDateTime::currentDateTime().toString(QString("'%1/CaméraAvant_'yyyy_MM_dd'_'hh_mm_ss'").arg(dossier));
                          //creation du filename qui contient l'emplacement du fichier et son nom
                          QFile file(filename1);
                          cameraAvant->setCaptureMode(QCamera::CaptureStillImage);//mode capture
                          cameraAvant->searchAndLock();//bloquage du camera
                          CameraImageCaptureAvant->capture(filename1);// prendre capture
                          cameraAvant->unlock();//debloquage du camera
                          QPixmap pix ("/home/pi/build-Rover-Desktop-Debug/Live.png");
                          ui->labelimage->setPixmap(pix);

                          jsulmJ 1 Reply Last reply
                          0
                          • N najlou

                            @jsulm
                            QString filename1=QDateTime::currentDateTime().toString(QString("'%1/CaméraAvant_'yyyy_MM_dd'_'hh_mm_ss'").arg(dossier));
                            //creation du filename qui contient l'emplacement du fichier et son nom
                            QFile file(filename1);
                            cameraAvant->setCaptureMode(QCamera::CaptureStillImage);//mode capture
                            cameraAvant->searchAndLock();//bloquage du camera
                            CameraImageCaptureAvant->capture(filename1);// prendre capture
                            cameraAvant->unlock();//debloquage du camera
                            QPixmap pix ("/home/pi/build-Rover-Desktop-Debug/Live.png");
                            ui->labelimage->setPixmap(pix);

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #14

                            @najlou This does not really help, as it does not show how the widgets are positioned (or put in layouts)...

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            N 1 Reply Last reply
                            0
                            • jsulmJ jsulm

                              @najlou This does not really help, as it does not show how the widgets are positioned (or put in layouts)...

                              N Offline
                              N Offline
                              najlou
                              wrote on last edited by najlou
                              #15

                              @jsulm i placed the label in the scrollarea
                              so how can i do it please ?

                              if(ui->Cameratoggle->isChecked())
                              {
                                  ui->stackedWidget->setCurrentIndex(1);// la premiere page du stackedwidger qui contient la premiere camera
                                  ui->scrollArea_2->setLayout(layoutAvant);
                                  cameraAvant->start();
                                  cameraArriere->stop();
                              

                              QPixmap pix ("/home/pi/build-Rover-Desktop-Debug/Live.png");
                              ui->labelimage->setPixmap(pix);

                              }
                              else {
                                  ui->stackedWidget->setCurrentIndex(0);
                                  ui->scrollArea->setLayout(layoutArriere);
                                  cameraArriere->start();
                                  cameraAvant->stop();
                              

                              QPixmap pix ("/home/pi/build-Rover-Desktop-Debug/Live.png");
                              ui->labelimage->setPixmap(pix);

                              }
                              
                              jsulmJ 1 Reply Last reply
                              0
                              • N najlou

                                @jsulm i placed the label in the scrollarea
                                so how can i do it please ?

                                if(ui->Cameratoggle->isChecked())
                                {
                                    ui->stackedWidget->setCurrentIndex(1);// la premiere page du stackedwidger qui contient la premiere camera
                                    ui->scrollArea_2->setLayout(layoutAvant);
                                    cameraAvant->start();
                                    cameraArriere->stop();
                                

                                QPixmap pix ("/home/pi/build-Rover-Desktop-Debug/Live.png");
                                ui->labelimage->setPixmap(pix);

                                }
                                else {
                                    ui->stackedWidget->setCurrentIndex(0);
                                    ui->scrollArea->setLayout(layoutArriere);
                                    cameraArriere->start();
                                    cameraAvant->stop();
                                

                                QPixmap pix ("/home/pi/build-Rover-Desktop-Debug/Live.png");
                                ui->labelimage->setPixmap(pix);

                                }
                                
                                jsulmJ Offline
                                jsulmJ Offline
                                jsulm
                                Lifetime Qt Champion
                                wrote on last edited by
                                #16

                                @najlou said in picture with a blinking effect:

                                i placed the label in the scrollarea

                                But how exactly? Is it over camera view? You need to really make it clear how everything is arranged exactly, else how should anybody know why the label disappears when you start to play video?

                                https://forum.qt.io/topic/113070/qt-code-of-conduct

                                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
                                • Unsolved