Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. India
  4. Form show is not immediate
Forum Updated to NodeBB v4.3 + New Features

Form show is not immediate

Scheduled Pinned Locked Moved India
9 Posts 3 Posters 2.7k 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.
  • A Offline
    A Offline
    amolypalshetkar
    wrote on last edited by
    #1

    fun1(){

    Code A
    form1.show();
    Code B
    }

    My problem is that until code B is not finished form1 is not shown immediately. Please tell me the solution for this.

    1 Reply Last reply
    0
    • IamSumitI Offline
      IamSumitI Offline
      IamSumit
      wrote on last edited by
      #2

      Hello amolypaishet..

      include<QDialog>
      fun1(){
      qDebug() << "Code A";

      QDialog wid;
      
      wid.exec&#40;&#41;;
      
      qDebug(&#41; << "Code B";
      

      }
      Try this.

      Be Cute

      1 Reply Last reply
      0
      • A Offline
        A Offline
        amolypalshetkar
        wrote on last edited by
        #3

        #include<QDialog>

        fun1(){

        qDebug() << “Code A”;

        w.show(); // Should display wait screen dialog
        /* My problem is that wait screen is not shown immediately but shown after code B is executed. */

        qDebug() << “Code B”; // Perform some calculations and read write to I/O device.

        w.hide(); // Hide wait screen dialog
        }

        1 Reply Last reply
        0
        • IamSumitI Offline
          IamSumitI Offline
          IamSumit
          wrote on last edited by
          #4

          This could be possible
          fun1(){

          code A;
          w.show(); //immediate show
          sleep(2000); //sleeps for 2 seconds
          code B;
          w.hide();
          }

          Be Cute

          1 Reply Last reply
          0
          • A Offline
            A Offline
            amolypalshetkar
            wrote on last edited by
            #5

            Tried the sleep(2000) but still the wait screen wont show up before code B gets executed.

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

              sleep() will make the delay even longer.

              In the future, please don't post the same question in different places. You already asked this at http://qt-project.org/forums/viewthread/38913/

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

              1 Reply Last reply
              0
              • A Offline
                A Offline
                amolypalshetkar
                wrote on last edited by
                #7

                Please give solution.

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

                  Solution at http://qt-project.org/forums/viewthread/38913/

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

                  1 Reply Last reply
                  0
                  • IamSumitI Offline
                    IamSumitI Offline
                    IamSumit
                    wrote on last edited by
                    #9

                    Try threading if you want things in parallel.
                    or try timer .

                    Be Cute

                    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