Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Run two qml file in the same python program
Qt 6.11 is out! See what's new in the release blog

Run two qml file in the same python program

Scheduled Pinned Locked Moved Unsolved Qt for Python
4 Posts 3 Posters 1.1k 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.
  • M Offline
    M Offline
    Marianagb
    wrote on last edited by
    #1

    Im trying to open a main.qml file and open after a button is clickled a new qml window.

    1 Reply Last reply
    0
    • DenniD Offline
      DenniD Offline
      Denni
      wrote on last edited by
      #2

      Look into multi-threaded programs either that or use a dockwidget

      madness... is like gravity, all takes is a little... push -- like from an unsolvable bug

      jsulmJ 1 Reply Last reply
      0
      • DenniD Denni

        Look into multi-threaded programs either that or use a dockwidget

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @Denni said in Run two qml file in the same python program:

        Look into multi-threaded programs

        How is the question related to multithreading? You can't even use GUI/Qml stuff in different threads - this is not supported in Qt. All UI related stuff needs to be in the main (GUI) thread.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • DenniD Offline
          DenniD Offline
          Denni
          wrote on last edited by
          #4

          Okay still fairly new to pyqt5 and thus my answer was based more on general programming knowledge -- multi-threading would allow the opening of multiple instances (and thus multiple windows) if that was part of the issue (which is not clearly defined at this point) and I also stated "or use a dockwidget" as that is an easy means of opening additional windows within the mainwindow if that is the only issue (again the actual issue is not clearly defined - so I was trying to cover both possible angles I could see within the statement that was made).

          madness... is like gravity, all takes is a little... push -- like from an unsolvable bug

          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