Is possible to use pyqt5 for some logic written in Python, and at the same time, use some C++ code for other actions in a GUI? Or are you locked using only PYQT, since the C++ code is ignored, when the PYQT code is running?
Related
Can someone please clarify what is QWebKit? I told it was just another widget from PyQt that allows to show webpages inside a gui.
Then I understood that with PyQt5 it doesn't come installed with PyQt anymore and I am not sure where to find it or how to install it on MAC.
I want a simple interface that changes the information shown in a page. I struggle to layout those information with the common PyQt widgets, so if I can relate all that to a simple HTML page to be shown inside a PyQt QWebView (with no CSS limitations) that would be great
Apparently QWebKit was deprecated on Qt5.6 or Qt5.7 (can't remember).
The continued version of that tool and API calls is QtWebEngine and I guess what you want is QtWebEngineWidgets.QWebEngineView()
I'm having trouble making a Sublime Text 3 plugin. I just installed wxPython with Python 2.7 on my Macintosh.
In the terminal, my Mac can find wxPython (import wx). But the source code of a Sublime Text plugin cannot import wxPython.
You can check out the screen capture below.
How can I fix this problem?
Plugins are executed using Sublime's internal Python interpreter, not any version of Python installed on your computer. Nearly all of the standard library is included, but a few packages (including Tkinter, among others) are not. To my knowledge it is not possible to use pip, for example, to install 3rd-party modules into Sublime Text.
However, if you would like to include some 3rd-party code, just put it in your plugin's directory. For example, if you store your plugin code in Packages/MyPlugin (where Packages is the directory opened by selecting Preferences -> Browse Packages...), and you want to include the 3rd-party library foobar, just copy the foobar directory into Packages/MyPlugin. Then, in your plugin code, use the following template, assuming you're trying to code for both ST3 (Python 3.3) and ST2 (Python 2.6):
try: #ST3
from .foobar import mymodule
except ImportError: #ST2
from foobar import mymodule
Obviously, if you're just planning on supporting ST3 (there are enough differences in the API to make programming for both versions annoying), you won't need the try/except clause. Also, if you are going to be distributing your plugin via Package Control or some other method, make sure you can redistribute the 3rd-party code, and that your license is compatible with its license.
GTK# switch between Process window handles
Hi,
In a GTK# program. Does anyone know how to switch between Process Window Handles? For example if I press a button in a GTK# program it switches the window to process gedit (text editor), or switches window process to another GTK# program running.
Basically I'm trying to port some of my previous windows C# code which switches between windows (processes). For example in C# to switch windows I used:
[DllImport("user32", EntryPoint = "SetForegroundWindow")]
public static extern int SetForegroundWindow(IntPtr hWnd);
I simply passed the Process Main Window Handle to this function above. Is there something similar I can use in GTK# on MonoDevelop for Centos Linux?
Thank you,
Andy
There is a library called libwnck: http://developer.gnome.org/libwnck/stable/ (Window Navigator Construction Kit) which handles all this functionality. There seems to be bindings for Mono called wnck-sharp which as far as I can tell, are included with gtk-sharp.
i have omni completion working fine for regular python functions, but how do i also get it to work for the wxpython functions?
Did you try vim.org? It has a Pydiction project on there that includes wxPython autocomplete as well as several other 3rd party Python libraries.
I am using Qtdesigner3 to write a python gui that will read data files do some math and then plot the results using matplotlib. I've looked at examples of matplotlib qt, but none of them use the designer.
My question is how do I create a matplotlib widget in the QTdesigner?
There is a better response to almost this exact question over at the pythonxy mailling list
http://groups.google.com/group/pythonxy/browse_thread/thread/c52424bf11328181?pli=1
To quote the salient point from the thread. This is from one of the lead developers of the project.
You may directly use the Matplotlib Qt Designer plugin which is
shipped with Python(x,y).
It is located here: "C:\Python26\Lib\site-packages\PyQt4\plugins
\designer\python".
On your linux machine, create an environment variable called
PYQTDESIGNERPATH, and set it to the directory containing
'matplotlibplugin.py'. That's all!
Python(x,y) has a matplotlib widget that can be used in Qt Designer. If you don't want to install Python(x,y), you can follow the instructions at this tutorial to create your own.