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. QWebview and omxplayer on RasPi
Qt 6.11 is out! See what's new in the release blog

QWebview and omxplayer on RasPi

Scheduled Pinned Locked Moved Solved Mobile and Embedded
omxplayeraspberry pi
2 Posts 1 Posters 2.2k 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.
  • liewjlsL Offline
    liewjlsL Offline
    liewjls
    wrote on last edited by liewjls
    #1

    Hi,

    I'm a newbie for the QT programming and RasPi. I'm in the process writing a application for the Raspi where it's get the html webpage from a link and the webpage has a video. The raspi has omxplayer and I can view video using omxplayer separately using a script. I managed to use some of the examples and QT documentation to load the html webpage.

    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv, QApplication::GuiServer);
    
        QWebView *view = new QWebView();
        view->setGeometry(0,0,960,720);
        view->setZoomFactor(1.5);
        view->setWindowState(Qt::WindowFullScreen);
        view->setStyleSheet("backgroud:transparent");
        view->setAttribute(Qt::WA_TranslucentBackground);
        view->page()->mainFrame()->setScrollBarPolicy( Qt::Vertical, Qt::ScrollBarAlwaysOff );
        view->page()->mainFrame()->setScrollBarPolicy( Qt::Horizontal, Qt::ScrollBarAlwaysOff );
        a.setOverrideCursor(Qt::BlankCursor);
    
        view->show();
    
        DownloadManager manager(view); //This is the class is a thread and start the omxplayer scripts. 
        manager.start();
    
        a.exec();
    
        qDebug() << "Terminating the DownloadManager";
        manager.exit();
        manager.wait();
    
        qDebug() <<"QThread is shutdown....";
    
        return 0;
    }
    

    The Html webpage has an embedded video, and the embedded video will stream video using the omxplayer. I was hoping the omxplayer will run under my QT application but I'm having a issue, when the omxplayer is running, it always run on top of my QT application.

    Is there any where I can run my QT application on top of the layer on my screen? or is there any solution so that i can embeded the video on the html page using the omxplayer?

    I'm using QT 4.8 at this moment, but i can move to 5.5 if required.

    thanks in advance.

    Regards,
    jenny

    1 Reply Last reply
    0
    • liewjlsL Offline
      liewjlsL Offline
      liewjls
      wrote on last edited by
      #2

      I moved to QT 5.5 and it works prefectly when i have another process triggered the oxmplayer which it is running underneath of my applicatioin.

      thanks.

      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