pyside

Problems with PySide installation

天大地大妈咪最大 提交于 2019-12-02 04:55:59
问题 I have python2.7.9 on my new Xubuntu installation, albeit it's 14.04. PySide installation stuck with Shiboken Linking CXX shared library libshiboken-python2.7.so /usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libpython2.7.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[2]: *** [libshiboken/libshiboken-python2.7

PyQt4 + matplotlib in a QScrollWidget

不想你离开。 提交于 2019-12-02 04:46:30
I have matplotlib embedded in a PyQt4 app that I'm working on. The problem is when I dynamically add a subplot to the figure, the figures compress with every added subplot. I thought I could solve this by setting the figure to a QScrollArea but that doesn't work (as far as I can tell). Here's an example of what I thought would work import os os.environ['QT_API'] = 'pyside' from PySide.QtGui import * from PySide.QtCore import * import matplotlib from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg from matplotlib.figure import Figure class Canvas(FigureCanvasQTAgg): def __init__

How to cancel font shadow in nuke pyside

痴心易碎 提交于 2019-12-02 04:24:11
I have a UI, which automatically sets font shadow in nuke, and how to cancel it. I want the font on this button to look like this, so there is no font shadow. This is my code,Thanks:) # -*- coding:utf-8 -*- from PySide import QtGui class MyButton(QtGui.QDialog): def __init__(self,parent=None): super(MyButton, self).__init__(parent) v_layout = QtGui.QVBoxLayout(self) btn = QtGui.QPushButton("Submit") v_layout.addWidget(btn) self.setStyleSheet(""" QPushButton{ height: 50px; border: 0px solid rgba(255, 255, 255, 0); font-size: 18px; font-family: "Microsoft YaHei"; border-radius: 4px; color: rgba

Run Python binaries under Windows XP

∥☆過路亽.° 提交于 2019-12-02 04:20:32
I compiled my PySide application to both x32 and x64 mode and it's work under Windows 7+. However I found that the application can't start under Windows XP. Should I use some tricks in spec-file additionally? Current PyInstaller script shown below in app.spec file: pyinstaller src/app.spec # -*- mode: python -*- import os import platform from PySide import QtCore onefile = False console = False platform_name = platform.system().lower() app_name = {'linux': 'app', 'darwin': 'app', 'windows': 'app.exe'}[platform_name] # Include imageformats plugins plugins=os.path.join(os.path.dirname(QtCore._

PYQT: How to capture output of python's interpreter and display it in QEditText?

为君一笑 提交于 2019-12-02 03:53:47
With reference to the post here . Can someone give me a detailed explanation on how to append the print statement's output to the QEditext in PYQT... I tried the code given above but it was incomplete and I got: TypeError: connect() slot argument should be a callable or a signal, not 'QTextEdit' In the first file i wrote: from PyQt4 import QtCore class EmittingStream(QtCore.QObject): textWritten = QtCore.pyqtSignal(str) def write(self, text): self.textWritten.emit(str(text)) In a seperate file I imported the first file and it is like this: from PyQt4 import QtGui, QtCore import os, sys class

Python- help('modules') unexpected behaviour

本小妞迷上赌 提交于 2019-12-02 03:25:38
I've been playing with QT and python using PySide. I've just done one of the basic tutorials . I've closed down python and restarted another session and now whenever I try to list the modules using help('modules') the button tutorial runs. If I close the window python crashes. The top of the error message is Process: Python [2005] Path: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python Identifier: org.python.python Version: 2.7.3 (2.7.3) Code Type: X86-64 (Native) Parent Process: bash [1967] Date/Time: 2013-01-09 12:38:53.307 +0000 OS Version: Mac OS

PyQt app doesn't exit when i close the window

人走茶凉 提交于 2019-12-02 03:25:18
Whenever i execute the code and close the window, it closes,but the python console in the IDE doesn't return the exit code,when i try to run it again i get a warning dialog that says something like No python console is selected to run main.py So i have to close the IDE python console, and open a new one, then run the program in the new python console I'm using spyder IDE 64 bits on windows from PyQt4.QtCore import * from PyQt4.QtGui import * import sys if __name__ == "__main__": app = QApplication(sys.argv) win = QMainWindow() win.show() sys.exit(app.exec_()) If you execute the code in a

How to send a keyboard shortcut for a menu item with QTest?

心已入冬 提交于 2019-12-02 03:20:20
In a unit test, I'm trying to send the keyboard shortcut Command+N (on Mac OS), which corresponds to a menu item in my app. I'm using the PySide.QtTest module. In the code below, I'm using QTest.keyClicks , which doesn't produce what I'm expecting. The action corresponding to the shortcut is not called. class AppTestCase(TestCase): def setUp(self): qApp = QApplication.instance() if qApp is None: self.app = QApplication([]) else: self.app = qApp class IdfEditorTestCase(th.AppTestCase): def setUp(self): super(IdfEditorTestCase, self).setUp() self.window = IdfEditorWindow() def test_input_object

How to get each Process ID when multiprocessing

夙愿已清 提交于 2019-12-02 03:04:54
问题 I have some problems because I'm newbie in Python and Pyside. I have N processes which are running at the same time. Since these processes take some times to finish their job, it's possible that end user wants to cancel a specific process. So I need a way to know the IDs of processes for adding this feature to the program. There is an answer in Stackoverflow which is exactly what I'm doing. Here is the code : #!/usr/bin/env python3 import multiprocessing, multiprocessing.pool, time, random,

Pyside install fails (Python 2.7.4)

醉酒当歌 提交于 2019-12-02 02:32:26
问题 I just upgraded to Ubuntu 13.04 (beta) and I'm getting an error when trying to install pyside into a Virtualenv (python 2.7.4) using pip: error: Failed to locate the Python library /usr/lib/libpython2.7.so.1 Anyone have any ideas? I've tried previous versions as well as the dev version, still no luck. EDIT: Console Log for post_install (monster)tony@tonyubuntu:~/Downloads/pyside-setup$ python pyside_postinstall.py -install PySide package found in /home/tony/Downloads/pyside-setup/PySide...