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. QT overlapping camera window issue

QT overlapping camera window issue

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 157 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.
  • G Offline
    G Offline
    Gohain
    wrote on last edited by
    #1

    We have an overlapping issue on QT widget windows. 3 camera windows are displayed in our main application. When we zoomed in one of the window, it displays full screen view. However, after approx. 10 minutes, we see other two camera windows on top of zoomed in window (overlapping). Attaching the screen shot for visualization.

    Below is the code snippet for zoom-in and zoom-out functionality

    //For making invisible background windows that were coming after zoom in

    void MyCamera::zoomInCamera(uint cameraHandle, int camearachanelid)
    {
    //Start - For continuous clicking

    QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
    GstreamerStream *camHandle=NULL;
    
    if(CAMERA_HANDLE_VALID == isHandleValid(cameraHandle))
    {
    camHandle = (GstreamerStream*)cameraHandle;        
    camHandle->zoomInCameraThread();
    
    QWidget *window = camHandle->getWindowObj();
    window->setWindowState(window->windowState() ^ Qt::WindowActive);         
    }
    for(int i=0;i<3;i++){
     GstreamerStream *camHandleVar = (GstreamerStream*)m_CameraHandles[i];
     if( cameraHandle != m_CameraHandles[i] ){
      QWidget *window = camHandleVar->getWindowObj();
      window->setUpdatesEnabled(false);
      //window->hide();
      }
    }
    QApplication::restoreOverrideCursor();
    

    }

    //Start - For showing invisible windows after zoom out
    void MyCamera::zoomOutCamera(uint cameraHandle, int camearachanelid)
    {
    //Start - By - For continuous clicking
    QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
    GstreamerStream camHandle=NULL;
    if(CAMERA_HANDLE_VALID == isHandleValid(cameraHandle))
    {
    camHandle = (GstreamerStream
    )cameraHandle;
    camHandle->zoomOutCameraThread();

     QWidget *window = camHandle->getWindowObj();
     window->setWindowState(window->windowState() ^ Qt::WindowActive);         
     }
     for(int i=0;i<3;i++){
     GstreamerStream *camHandleVar = (GstreamerStream*)m_CameraHandles[i];
     if( cameraHandle != m_CameraHandles[i] ){
          QWidget *window = camHandleVar->getWindowObj();
          //Added below line
          window->setUpdatesEnabled(true);
          window->setWindowState(window->windowState() ^ Qt::WindowActive);
    }
     }
    QApplication::restoreOverrideCursor();
    

    }
    ========================================================== I tried using setWindowState, setUpdatesEnabled API calls, but it is not working as per expected behaviour.

    How do I prevent the windows overlapping issue?

    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