¡@

Home 

python Programming Glossary: qtcore

Embedding IPython Qt console in a PyQt application

http://stackoverflow.com/questions/11513132/embedding-ipython-qt-console-in-a-pyqt-application

import catch_config_error from PyQt4 import QtCore class IPythonLocalKernelApp IPKernelApp DEFAULT_INSTANCE_ARGS.. version of the ipython qt4 kernel loop kernel.timer QtCore.QTimer kernel.timer.timeout.connect kernel.do_one_iteration.. import TraitError from PyQt4 import QtGui QtCore def event_loop kernel kernel.timer QtCore.QTimer kernel.timer.timeout.connect..

time.sleep() required to keep QThread responsive?

http://stackoverflow.com/questions/14665636/time-sleep-required-to-keep-qthread-responsive

Here is the current code import time random sys from PyQt4.QtCore import from PyQt4.QtGui import from matplotlib.figure import.. do ok at 30 40 fps . import time random sys #from PySide.QtCore import #from PySide.QtGui import from PyQt4 import QtCore from.. import #from PySide.QtGui import from PyQt4 import QtCore from PyQt4 import QtGui from matplotlib.figure import Figure..

multiprocessing GUI schemas to combat the “Not Responding” blocking

http://stackoverflow.com/questions/15698251/multiprocessing-gui-schemas-to-combat-the-not-responding-blocking

the overlying sturcture of my program from PyQt4 import QtCore QtGui import multiprocessing as mp import numpy as np import.. should only quickly update when needed class Worker_thread QtCore.QThread # signals and slots are used to communicate back to.. to communicate back to the main GUI thread update_signal QtCore.pyqtSignal int done_signal QtCore.pyqtSignal def __init__ self..

PyQt - Column of Checkboxes in a QTableView

http://stackoverflow.com/questions/17748546/pyqt-column-of-checkboxes-in-a-qtableview

without the label. ''' checked index.model .data index QtCore.Qt.DisplayRole 'True' check_box_style_option QtGui.QStyleOptionButton.. QtGui.QStyleOptionButton if index.flags QtCore.Qt.ItemIsEditable 0 check_box_style_option.state QtGui.QStyle.State_Enabled.. hasFlag does not exist #if not index.model .hasFlag index QtCore.Qt.ItemIsEditable #check_box_style_option.state QtGui.QStyle.State_ReadOnly..

PyQt: Always on top

http://stackoverflow.com/questions/1925015/pyqt-always-on-top

possible example import sys from PyQt4 import QtGui QtCore class mymainwindow QtGui.QMainWindow def __init__ self QtGui.QMainWindow.__init__.. def __init__ self QtGui.QMainWindow.__init__ self None QtCore.Qt.WindowStaysOnTopHint app QtGui.QApplication sys.argv mywindow..

Linking a qtDesigner .ui file to python/pyqt?

http://stackoverflow.com/questions/2398800/linking-a-qtdesigner-ui-file-to-python-pyqt

another way to use .ui in your code is from PyQt4 import QtCore QtGui uic class MyWidget QtGui.QWidget ... #somewhere in constructor..

How to embed a Python interpreter in a PyQT widget

http://stackoverflow.com/questions/2758159/how-to-embed-a-python-interpreter-in-a-pyqt-widget

import sys os import traceback from PyQt4 import QtCore from PyQt4 import QtGui class Console QtGui.QPlainTextEdit def.. text.rstrip ' n' self.write_func stripped_text QtCore.QCoreApplication.processEvents self.skip not self.skip sys.stdout.. def keyPressEvent self event if event.key in QtCore.Qt.Key_Enter QtCore.Qt.Key_Return self.runCommand return if..

Should wildcard import be avoided?

http://stackoverflow.com/questions/3615125/should-wildcard-import-be-avoided

into this issue. If my import statements are from PyQt4.QtCore import from PyQt4.QtGui import then pylint gives hundreds of.. to see. Another option would be to do this from PyQt4.QtCore import Qt QPointF QRectF from PyQt4.QtGui import QGraphicsItem.. line. There's a third option which is from PyQt4 import QtCore QtGui and then prefix all the classes with QtCore or QtGui whenever..

PyQT4: Drag and drop files into QListWidget

http://stackoverflow.com/questions/4151637/pyqt4-drag-and-drop-files-into-qlistwidget

the project. The main script import sys from PyQt4 import QtCore from PyQt4 import QtGui from PyQt4.QtGui import QListWidget.. self parent self.ui Ui_window self.ui.setupUi self QtCore.QObject.connect self.ui.listWidget QtCore.SIGNAL dropped self.picture_dropped.. self QtCore.QObject.connect self.ui.listWidget QtCore.SIGNAL dropped self.picture_dropped def picture_dropped self..

PyQt4: how to make undercorated window with reserved space

http://stackoverflow.com/questions/5829585/pyqt4-how-to-make-undercorated-window-with-reserved-space

prop Example from PyQt4 import QtGui QtCore app QtGui.QApplication win QtGui.QMainWindow win.setWindowFlags.. win QtGui.QMainWindow win.setWindowFlags win.windowFlags QtCore.Qt.FramelessWindowHint win.show share improve this answer..

Background thread with QThread in PyQt

http://stackoverflow.com/questions/6783194/background-thread-with-qthread-in-pyqt

find the right approach to your problem. from PyQt4 import QtCore import time import sys # Subclassing QThread # http doc.qt.nokia.com.. # http doc.qt.nokia.com latest qthread.html class AThread QtCore.QThread def run self count 0 while count 5 time.sleep 1 print.. 2007 07 05 qthreads no longer abstract class SomeObject QtCore.QObject finished QtCore.pyqtSignal def longRunning self count..

PyQt4 names showing as undefined in eclipse, but it runs fine

http://stackoverflow.com/questions/8082230/pyqt4-names-showing-as-undefined-in-eclipse-but-it-runs-fine

I am using PyQt4. At the top of my file I have from PyQt4.QtCore import from PyQt4.QtGui import In addition I have the PyQt4.. still I'd suggest you get used to from PyQt4 import QtGui QtCore and reference classes like QtGui.QMainWindow . share improve..

How to capture output of Python's interpreter and show in a Text widget?

http://stackoverflow.com/questions/8356336/how-to-capture-output-of-pythons-interpreter-and-show-in-a-text-widget

data written to it with a Qt signal from PyQt4 import QtCore class EmittingStream QtCore.QObject textWritten QtCore.pyqtSignal.. a Qt signal from PyQt4 import QtCore class EmittingStream QtCore.QObject textWritten QtCore.pyqtSignal str def write self text.. QtCore class EmittingStream QtCore.QObject textWritten QtCore.pyqtSignal str def write self text self.textWritten.emit str..

PyQt - how to detect and close UI if it's already running?

http://stackoverflow.com/questions/8786136/pyqt-how-to-detect-and-close-ui-if-its-already-running

import sip sip.setapi 'QString' 2 from PyQt4 import QtGui QtCore QtNetwork class SingleApplication QtGui.QApplication messageAvailable.. SingleApplication QtGui.QApplication messageAvailable QtCore.pyqtSignal object def __init__ self argv key QtGui.QApplication.__init__.. key QtGui.QApplication.__init__ self argv self._memory QtCore.QSharedMemory self self._memory.setKey key if self._memory.attach..