![]() Registered Member ![]()
|
Any python QT wizard here who knows, how to make a foreign application run inside a window in Krita?
|
![]() Registered Member ![]()
|
That's not possible. You can run other programs from within Python, but they will always run on their own like they normally would. Some programs are designed so that you can communicate with them, but most aren't.
|
![]() Registered Member ![]()
|
Just got interested when I saw the answer on this post, https://stackoverflow.com/questions/414 ... n-gui-pyqt
and thought it would be cool if I can run other useful things inside Krita. |
![]() Registered Member ![]()
|
So you already have the answer how that works from the QT side of things. (Though, technically, that's not quite running a program within
Qt—it's starting a program the regular way, then snagging its window and capture it inside a QT window.) The bigger issue is how to work with the operating system's window manager. There's a a windows-specific solution there that needs a library that's not included in Krita's Python, and I'm pretty sure it's the same for other OS/Window Manager combinations. Still, except for the novelty that it's possible, I don't see what you would gain from this. It looks like a usability nightmare, and you still can't communicate with the program beyond what the program allows for external communication. |
![]() Registered Member ![]()
|
Thank you for your insight, Truth is, I never got this to work, even with the win32gui lib, which I don't really get and I don't really understand QT this deep too, I just use QT to create buttons for my painting helper tools inside Krita. Looking at the link, I just run the codes without error inside Krita, and used WinSpy++ to get some window information, but no reaction nor error can be seen when I execute the code mentioned, so I got no leads on what to quickly study to make it run. Sorry for the trouble, there isn't really a good reason why I am trying to do this, I'm just curious and wanted to run PureRef inside Krita and see if it looks cool and maybe get a new idea for what to do with it next. |
![]() Registered Member ![]()
|
Btw, what I do when I use PureRef: I make Pureref "Always on top" , then place the PureRef window on my Krita window in a spot on the canvas where I have some room. It looks almost like a docker that way, see here.
Optionally, you can play with the transparent canvas option of PureRef, and the transparent for mouse option. I'm pretty sure that all these neat modes that PureRef has won't work out of the box inside a Qt window. And I wouldn't necessarily expect any automatic resizing of PureRef if you resize the Qt window either, or vice versa, resizing of the Qt window if you use PureRef's resizing options. And if you look at all parts of Krita that open separate windows, what difference makes it that they are part of Krita, from a GUI perspective? They act on their own, with the only exception in my window manager that they get grouped together when I alt+TAB through windows. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]