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. Application Output - End button Not Disable
Forum Updated to NodeBB v4.3 + New Features

Application Output - End button Not Disable

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.4k Views 2 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.
  • MeenuM Offline
    MeenuM Offline
    Meenu
    wrote on last edited by
    #1

    Hi,

    I was created QDialog for capture camera data. Its working good. i have doubt on,

    1. Just Application Run & End :OK
      Build-> Run-> Application open -> clicked close button from top right corner -> Dialog closed -> QT Creator's Application end button disabled perfectly [/home/Proj/build/Test exited with code 0].

    2. Application Run with Camera data capture process & End : PROBLEM
      Build-> Run-> Application open ->Start Capture -> Stop Capture -> clicked close button from top right corner -> Dialog closed -> QT Creator's Application end button Still Enabled [Starting /home/Proj/build/Test... - here not exited with code 0].

    What is the reason?
    How can i recover from this problem?

    kshegunovK 1 Reply Last reply
    0
    • MeenuM Meenu

      Hi,

      I was created QDialog for capture camera data. Its working good. i have doubt on,

      1. Just Application Run & End :OK
        Build-> Run-> Application open -> clicked close button from top right corner -> Dialog closed -> QT Creator's Application end button disabled perfectly [/home/Proj/build/Test exited with code 0].

      2. Application Run with Camera data capture process & End : PROBLEM
        Build-> Run-> Application open ->Start Capture -> Stop Capture -> clicked close button from top right corner -> Dialog closed -> QT Creator's Application end button Still Enabled [Starting /home/Proj/build/Test... - here not exited with code 0].

      What is the reason?
      How can i recover from this problem?

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #2

      @Meenu
      Probably your application hangs on exit. Break the execution (use the pause button in the debug view) when that happens (case 2) and extract a stack trace to see where the problem might lie.

      Kind regards.

      Read and abide by the Qt Code of Conduct

      MeenuM 1 Reply Last reply
      2
      • kshegunovK kshegunov

        @Meenu
        Probably your application hangs on exit. Break the execution (use the pause button in the debug view) when that happens (case 2) and extract a stack trace to see where the problem might lie.

        Kind regards.

        MeenuM Offline
        MeenuM Offline
        Meenu
        wrote on last edited by
        #3

        @kshegunov
        No hanging problem while exit.
        So i like to print the message using qDebug().

        Dialog::~Dialog()
        {
            if(startcapture)  on_StopCapture();
            delete ui;
            qDebug() << "deleted ui";
        }
        

        Dialog open and Close (No Data Capture Process):
        Starting /home/Proj/build/Test...
        deleted ui
        /home/Proj/build/Test exited with code 0

        Dialog open with Data Capture Process then close:
        Starting /home/Proj/build/Test...
        Start Capture
        End Capture
        deleted ui
        Note: After calls destructor function, More then 60 to 100 seconds taken to end the application normally like - /home/Proj/build/Test exited with code 0

        What is the reason?

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          Hi @Meenu,

          Please show us the code on how you start and stop the camera

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          1
          • MeenuM Offline
            MeenuM Offline
            Meenu
            wrote on last edited by
            #5

            used timer concept to capture camera data.

            void timer_handler(void)
            {     
                StartAcquisition();  
            }
            void Dialog::on_StartCapture()//button clicked
            { 
              if(start_timer(1000, &timer_handler))
              {
                printf("\n timer error\n");
              }
            }
            void Dialog::on_StopCapture()//button clicked
            {        
                stop_timer();
                StopAcquisition();
            }
            

            I have one more problem.
            I like to use more than one timer in my application using this timer concept. I tired but single timer only execute(which one is last defined). Kindly clear me.

            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