Important: Please read the Qt Code of Conduct -

Qml how Open new Window capture Barcode

  • Hi.

    I have a Window:


    open a new window where I will do the barcode capture logic (I have it ready) but I don't know how to do to:

    1. open a new window
    2. send the data back to the root window

    Do you have any examples? also trivial

    Thank you all

  • Moderators

    This might work (brain-to-terminal, completely untested):

    ApplicationWindow {
      BarcodeWindow {
        id: barcodeWindow
        onBarcodeScanned: {
          console.log("Scanned: " + blah)
      Button {
        onClicked: barcodeWindow.visible = !barcodeWindow.visible
    // BarcodeWindow.qml
    Window {
      signal barcodeScanned(string blah)
      visible: false
      // ...your barcode scannning code...

Log in to reply