Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QScreen for KTV multi-screen application problem.
Forum Updated to NodeBB v4.3 + New Features

QScreen for KTV multi-screen application problem.

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 822 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.
  • K Offline
    K Offline
    kingctan
    wrote on last edited by
    #1

    I am developing a KTV software in ubuntu. when program start, we need detect if the TV screen has add via VGA line. and show the video to TV screen. also the PC for operating songs has another video play interface.

    So, I create two QtQuick2ApplicationViewer as blew, I am not sure it is right to do this.

    @
    int main(int argc, char *argv[])
    {
    QGuiApplication app(argc, argv);

    int screenwidth = QGuiApplication::primaryScreen()->size().width();
    int screenheight = QGuiApplication::primaryScreen()->size().height();
    
    QtQuick2ApplicationViewer viewer;
    viewer.rootContext()->setContextProperty("msg",themeuse);
    viewer.rootContext()->setContextProperty("screenwidth",screenwidth);
    viewer.rootContext()->setContextProperty("screenheight",screenheight);
    viewer.setMainQmlFile(QStringLiteral("qml/linuxktv/main.qml"));
    //    viewer.showExpanded();
    viewer.showFullScreen();
    
    QObject *player = viewer.findChild<QObject*>("player");
    
    
    QtQuick2ApplicationViewer viewer2;
    viewer2.rootContext()->setContextProperty("player",player);
    viewer2.setMainQmlFile&#40;QStringLiteral("qml/linuxktv/main2.qml"&#41;&#41;;
    viewer2.setGeometry(1440,24,1920,1056&#41;;
    viewer2.showFullScreen();    
    viewer2.setFlags(Qt::WindowStaysOnTopHint);
    
    return app.exec(&#41;;
    

    }
    @

    And my question is: how to sync video within two screen,also is how to share a video object with two viewers?
    many thanks.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kingctan
      wrote on last edited by
      #2

      OK, I have resolved it.

      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