Questions tagged [pyqt4]

PyQt consists of Python bindings created for the Qt application framework, enabling usage on various platforms such as Windows, MacOS/X, and Linux which are all supported by Qt.

Adjusting the size of a dialog box using PyQt4

Check out this code sample: import sys from PyQt4.QtGui import (QApplication, QHBoxLayout, QVBoxLayout, QDialog, QFrame, QPushButton, QComboBox) class Widget(QDialog): def __init__(self, parent=None): ...

Can PyQt4/PySide packages be successfully incorporated into a Virtualenv environment?

Utilizing Virtualenv has been a game-changer for me in my development environment, particularly when working with web.py, simplejson, and other web-focused packages. I am embarking on developing a basic Python client using Qt to leverage some APIs create ...

What is the best way to make objects stand out in a scene during a Maya event of a change?

Currently, I am utilizing Maya2014 along with pyqt4.8 and python2.7. I am in the process of developing an application that aims to streamline and expedite the selection of items within Maya. This selector tool will allow users to easily attach objects in ...

What is the best method for converting a QImage into a pixel list within PyQt?

I am a bit confused about the QImage.bits() and QImage.constBits() functions in Python. Both return a voidptr, but I'm unsure how to work with that data type in Python since I'm more used to working with C++. When it comes to the data type, I mean somethi ...

Strategies for including multiple lines of text in a QTextTable cell using Python, C++, PyQt4, and Qt4

My goal is to generate an odt document using PyQt4 where I need to insert multi-line text into cells. Here's a sample of my code: from PyQt4 import QtGui doc = QtGui.QTextDocument() cur = QtGui.QTextCursor(doc) table = cur.insertTable(1, 2) # The cu ...

Discovering the clickable widget index in pyqt4: A beginner's guide

In my application, I am working on creating multiple widget orders using a list of dictionaries to create a list of widgets. I have implemented a mouse release event for clickable widgets, but I am facing issues in identifying the clicked widget index. C ...

I need assistance with adding an icon to a qinputdialog in my pyqt4 application. Can someone provide

Below is the code snippet I am currently working with: languages = ['English', 'rus', 'uk', 'fr', 'germ'] s, ok = QtGui.QInputDialog.getItem(window, 'title', 'help', languages, current = 0, editable = False) ...

Python Qt: Create a custom QGraphicsItem with interactive resizing capabilities that does not change size when mouse hovers over

I am attempting to create a Python class that wraps around QGraphicsRectItem (PySide or PyQt4) in order to enable mouse interaction through hover-overs, allow for movement, and resizing. Everything is functioning properly except for one issue: It appears ...

Object-Oriented Programming in Python: Classes and Inheritance

... from PyQt4.QtGui import * from PyQt4.QtCore import * class UserInfoModalWindow(QDialog): def init(self): super(UserInfoModalWindow, self).init() self.dialog_window = QDialog(self) ... ...

PyQt4 Error: The 'self' attribute is not recognized in the function object

I am facing an issue where I cannot change the values in the GUI table from the main program, resulting in an error. AttributeError: 'function' object has no attribute 'commandTable' Despite attempting the solution provided in this ...

Tips for dynamically adding widgets after the parent has been created

As I work on building a custom interface with unique widgets, I face a specific challenge. I have developed a widget named Rectangle that serves as an interactive element within my interface. To define a rectangle, I must assign it a parent for the window ...

Is it possible to integrate Chrome browser into a python QT GUI?

Currently, I am working on a Python GUI that leverages Selenium to open a Chrome window. I was curious if there is a way within the PyQT GUI to embed the Chrome browser's window, essentially combining them into one interface instead of having separate ...