Python Forum
How can I run an interface I made using PyQt5 and a Map program I made using Tkinter
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I run an interface I made using PyQt5 and a Map program I made using Tkinter
#5
(Nov-09-2023, 08:27 PM)deanhystad Wrote: A couple problems. When you import a module the first time, Python executes the module code. If you don't want to draw the map you must put that code inside a function or hide it behind if __name__ == '__main__' :. The bigger problem is it sounds like you are running tk in one process and mainloop in another. That will not work. You must create your windows and run mainloop in the same process.

from multiprocessing import Process

def ana() :
    from mainMap import root_tk
    from mainarayĆ¼z import main
    p1 = Process(target=(root_tk, main))
    p1.start()

ana()
like this?
Reply


Messages In This Thread
RE: How can I run an interface I made using PyQt5 and a Map program I made using Tkinter - by bki - Nov-09-2023, 09:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Graphic Interface with Tkinter IgnacioMora23 0 1,853 May-27-2021, 04:35 AM
Last Post: IgnacioMora23
  [Tkinter] Noob question:Using pyttsx3 with tkinter causes program to stop and close, any ideas? Osman_P 4 5,422 Nov-14-2020, 10:51 AM
Last Post: Osman_P
  Made new instance - button still goes to old instance nanok66 6 3,104 Nov-06-2020, 07:44 PM
Last Post: deanhystad
  [Tkinter] Indentation for Tkinter-made Text Editor ShakeyPakey 4 5,291 Jun-08-2020, 03:13 PM
Last Post: menator01
Question [Tkinter] Defining a self made module's function to interact with the main .py variables? Gilush 9 4,564 Jun-08-2020, 09:08 AM
Last Post: Gilush
  PyQt5 How do you make a functioning login and registration program? YoshikageKira 4 7,356 Jan-17-2020, 09:51 PM
Last Post: pavulon
  tkInter and Pillow don't display any images in GUIs - program gives errors instead SomeRandomGuy 9 11,189 Oct-29-2019, 02:57 PM
Last Post: SomeRandomGuy
  Exiting/killing a program with tkinter but leaving the graphic on the screen jpezz 3 4,091 Apr-07-2019, 02:13 PM
Last Post: jpezz
  Huge code problems (buttons(PyQt5),PyQt5 Threads, Windows etc) ZenWoR 0 2,913 Apr-06-2019, 11:15 PM
Last Post: ZenWoR
  [Tkinter] Unable to Obtain values from one Tkinter Program into another nilaybnrj 1 2,628 Aug-24-2018, 01:24 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020