Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Moving the opencv window on top Qt(c++) dialogs/widgets
Forum Updated to NodeBB v4.3 + New Features

Moving the opencv window on top Qt(c++) dialogs/widgets

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
13 Posts 2 Posters 4.6k 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.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by mrjj
    #2

    Hi
    How are you showing the dialogs?
    Dialogs are pr default modal, meaning they block other windows from interaction while open.
    if you use exec() it will block.
    if you use show(), they will not. ( make sure to new the dialog or it runs out of scope)
    Maybe you rather have at Qt:tool window if design is to have the dialog open while
    using the mainwindow?

    You might also considering docks
    http://doc.qt.io/qt-5/qtwidgets-mainwindows-dockwidgets-example.html
    which can both float as windows and be in the sides.

    D 1 Reply Last reply
    0
    • mrjjM mrjj

      Hi
      How are you showing the dialogs?
      Dialogs are pr default modal, meaning they block other windows from interaction while open.
      if you use exec() it will block.
      if you use show(), they will not. ( make sure to new the dialog or it runs out of scope)
      Maybe you rather have at Qt:tool window if design is to have the dialog open while
      using the mainwindow?

      You might also considering docks
      http://doc.qt.io/qt-5/qtwidgets-mainwindows-dockwidgets-example.html
      which can both float as windows and be in the sides.

      D Offline
      D Offline
      demonferrari
      wrote on last edited by
      #3

      @mrjj

      Thanks for the reply.

      I am using the show() option (by newing the dialog). But still i am not able to get the two image windows to the foreground. The two image windows("source" and "center") are from opencv (cv::namedWindow) .

      Will i face any problem if i use qt for developing GUI and opencv for image processing operations? (I read on the internet that qt and opencv run on different threads. Is this true?)

      mrjjM 1 Reply Last reply
      0
      • D demonferrari

        @mrjj

        Thanks for the reply.

        I am using the show() option (by newing the dialog). But still i am not able to get the two image windows to the foreground. The two image windows("source" and "center") are from opencv (cv::namedWindow) .

        Will i face any problem if i use qt for developing GUI and opencv for image processing operations? (I read on the internet that qt and opencv run on different threads. Is this true?)

        mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #4

        @demonferrari
        Hi
        Can you try with
        http://doc.qt.io/qt-5/qwidget.html#raise
        since you are using show() it sounds ok.

        Hmm are you saying those are openCV windows?

        D 1 Reply Last reply
        0
        • mrjjM mrjj

          @demonferrari
          Hi
          Can you try with
          http://doc.qt.io/qt-5/qwidget.html#raise
          since you are using show() it sounds ok.

          Hmm are you saying those are openCV windows?

          D Offline
          D Offline
          demonferrari
          wrote on last edited by
          #5

          @mrjj

          Yes they are opencv windows.

          mrjjM 1 Reply Last reply
          0
          • D demonferrari

            @mrjj

            Yes they are opencv windows.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by mrjj
            #6

            @demonferrari
            ok, are those made with Qt or native windows ?
            It seems to be native windows and as such, they know nothing
            about Qt widgetstack/order.

            They do talk about Qt at their site.

            Normally people use the output in Qt windows/widgets
            https://stackoverflow.com/questions/14729417/open-webcamera-with-opencv-and-show-it-with-qlabel-white-window/14729778#14729778

            You might be able to wrap the CV window in
            http://doc.qt.io/qt-5/qwindow.html#details
            so they become part of the Qt system.

            Update:
            Are CV windows actually Qt powered ?

            D 1 Reply Last reply
            0
            • mrjjM mrjj

              @demonferrari
              ok, are those made with Qt or native windows ?
              It seems to be native windows and as such, they know nothing
              about Qt widgetstack/order.

              They do talk about Qt at their site.

              Normally people use the output in Qt windows/widgets
              https://stackoverflow.com/questions/14729417/open-webcamera-with-opencv-and-show-it-with-qlabel-white-window/14729778#14729778

              You might be able to wrap the CV window in
              http://doc.qt.io/qt-5/qwindow.html#details
              so they become part of the Qt system.

              Update:
              Are CV windows actually Qt powered ?

              D Offline
              D Offline
              demonferrari
              wrote on last edited by
              #7

              @mrjj

              Yes opencv windows are developed using qt.

              mrjjM 1 Reply Last reply
              0
              • D demonferrari

                @mrjj

                Yes opencv windows are developed using qt.

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #8

                @demonferrari
                Ok, should just work then.
                Are you giving them a parent ?
                Did raise have any effect ?

                D 2 Replies Last reply
                0
                • mrjjM mrjj

                  @demonferrari
                  Ok, should just work then.
                  Are you giving them a parent ?
                  Did raise have any effect ?

                  D Offline
                  D Offline
                  demonferrari
                  wrote on last edited by
                  #9

                  @mrjj

                  No. I used lower() to lower the qt widget window but still the same result.

                  mrjjM 1 Reply Last reply
                  0
                  • D demonferrari

                    @mrjj

                    No. I used lower() to lower the qt widget window but still the same result.

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    @demonferrari
                    ok, hard to tell whats up with those.
                    maybe look in the CV source to see what flags are used to create them.
                    Also if you are giving the QDialog parents (like dialog where u open second),
                    they might stay over those etc.

                    Sorry, i cant provide more direct tips.- I dont know CV windows.

                    1 Reply Last reply
                    0
                    • mrjjM mrjj

                      @demonferrari
                      Ok, should just work then.
                      Are you giving them a parent ?
                      Did raise have any effect ?

                      D Offline
                      D Offline
                      demonferrari
                      wrote on last edited by
                      #11

                      @mrjj

                      I think we should make changes in the qt code used to implement the opencv window

                      mrjjM 1 Reply Last reply
                      0
                      • D demonferrari

                        @mrjj

                        I think we should make changes in the qt code used to implement the opencv window

                        mrjjM Offline
                        mrjjM Offline
                        mrjj
                        Lifetime Qt Champion
                        wrote on last edited by
                        #12

                        @demonferrari
                        well at least check out what flags are used to create them.

                        D 1 Reply Last reply
                        0
                        • mrjjM mrjj

                          @demonferrari
                          well at least check out what flags are used to create them.

                          D Offline
                          D Offline
                          demonferrari
                          wrote on last edited by
                          #13

                          @mrjj

                          i checked the header and cpp files for the opencv window GUI. I was not able to figure out .

                          how do i check for the flags?

                          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