pyqt4

QTWebKit Mac Flash 10.1 plugin Double Type Error

I actually use PyQT but I can replicate the issue using QT aswell. Basically when I navigate to a flash website where I have to input text using QWebView it doubles all my key presses. This only happens in flash 10.1, it does not happen when I use the flash 10.0 or lower plugin (I have tested flash 9 aswell). The bug, as far as I can ...

How to change text alignment in QTabWidget?

I cannot find a way to set the text alignment in a QTabWidget. After I've created an instance of this widget, I've set its tabPosition property to West, but I wish it showed text/label horizontally. I've given a look to the Qt's stylesheets, but as you can see, the text-align property can only be set on QPushButton and QProgressBar. I...

Should wildcard import be avoided?

I'm using PyQt and am running into this issue. If my import statements are: from PyQt4.QtCore import * from PyQt4.QtGui import * then pylint gives hundreds of "Unused import" warnings. I'm hesitant to just turn them off, because there might be other unused imports that are actually useful to see. Another option would be to do this:...

QToolBar: Is there a way to add QAction to a QToolBar in QtDesigner?

I've a PyQt4 Installed on Python 2.6. I wish to insert actions or widgets into a toolbar in QtDesigner instead of adding them in code, with addAction or addWidget (as simple as adding actions to a menu in design time). ...

PyQt application crashes after closing QMessagebox window.

Here is the code of my simple tray application. It crashes with segfault when i call information window from context menu of application and then close it. I've tryed different variants to find a reason of segfault, this is my last try. #!/usr/bin/env python # -*- coding: utf-8 -*- import sys from PyQt4 import QtCore from PyQt4 import ...

How can I move file into Recycle Bin / trash on different platforms using PyQt4?

I would like to add the next feature to my cross-platform PyQt4 application: when user selects some file and select "remove" action on it that file will be moved to Recycle Bin folder instead of being permantly removed. I think I can find Windows-specific solution using Win32 API or something similar, but I'd like to know does similar op...

PEP8 and PyQt, how to reconcile

I'm starting to use PyQt in some projects and I'm running into a stylistic dilemma. PyQt's functions use camel case, but PEP8, which I prefer to follow, says to use underscores and all lowercase for function names. So on the one hand, I can continue to follow PEP8, meaning that my code will have mixed functions calls to camel case and ...

Sending a custom header along with qtwebkit request

I'm doing some work with PyQt4 and QtWebKit, and in the web page request need to send a custom "Host" header along with the standard HTTP request. I'm not seeing any options for adding custom headers to the request, but this is all new to me so I hope I'm missing something. I'm looking here: http://doc.trolltech.com/4.6/qwebsettings.htm...

Overriding hostname IP address in qtwebkit request

I'm downloading a web page (with PyQt4/QtWebKit) using given hostname, but I would like to use a pre-defined IP address for that hostname. For example, I need to hit "http://www.mysite.com" but use the IP address 1.2.3.4 instead of the actual resolved IP address. Is this at all possible in QtWebKit? I've tried a couple things so far: H...

pyqt4: Open website in standard browser on button click.

I would like to open website in standard browser of operating system when user clicks a button in my pyqt4 application. How can I do this? ...

Using PyQt4 with bbfreeze - wrong ui style used

Hi So to give a little context, my goal here is to produce a binary which will run my Python/PyQt4 application on any recent linux (but mainly ubuntu), without requiring the user to install the pyqt4 or pyqwt5 library. (If anyone can give a better way to do that than my method below, that would be great also :) I've got this mostly wor...

Phonon on Windows

Right now I have Phonon working on windows with a DS backend. However, it will not play certain mp3 files and although it appears to be playing m4a files (the song progress bar keeps moving) no sound comes out. The application is built using PyQt4 on Windows and is aimed at Windows users. I know that this is not the fault of my program...

Packaging python applications with PyQt and PyQwt (for linux only)

This is a follow on from my question here, I think I will have to look at a different method. I'm wanting to package my python program with some of it's dependencies. I'm aware of tools like cx freeze or bb freeze, but as you can see in the linked question they have issues for my situation. I don't want my users to have to install my ...

PyQt4.QtWebKit: QWebPage QWebView set timeout when load stop

Is there any way to say to a QWebPage or to a QWebView stop loading page if some sort of timeout is exceeded? Sultan ...

how to write a python program that automatically starts when windows start

hello , I'm writing a program using python 2.6 and pyqt4 , i want this program to automatically start whenever i start windows . (something like uTorrent client).so how do i make this work ?i use windows 7 please help ...

PyQt_PyObject equivalent when using new-style signals/slots?

Hi. So I have a need to pass around a numpy array in my PyQt Application. I first tried using the new-style signals/slots, defining my signal with: newChunkToProcess = pyqtSignal(np.array()), however this gives the error: TypeError: Required argument 'object' (pos 1) not found I have worked out how to do this with the old-style signal...

PyQT: Rotate a QLabel so that it's positioned diagonally instead of horizontally

Hi folks, I'm working on a touch screen app where gui space is very tight. I'd like to rotate a QLabel a bit so that it's either vertical, or offset at a diagonal a bit. Any suggestions? I couldn't find anything relevant on the QLabel interface. Thanks so much! ...

Python - Qt. How to make a Terminal Window for Telnet or ssh server interaction.

Hi, i am making a PyQt application, and i want to make something like a Terminal Window, where the user can interact with a Telnet or ssh server. My first idea was to have a Window with a black QPlainTextEdit and a scrollbar. I am new to python-Qt world and would appreciate some guidance. Any ideas? Thanks :-) ...

Implement a userEdited signal to QDateTimeEdit?

QLineEdit has a textEdited signal which is emitted whenever the text is changed by user interaction, but not when the text is changed programatically. However, QDateTimeEdit has only a general dateTimeChanged signal that does not distinguish between these two types of changes. Since my app depends on knowing if the field was edited by th...

PyQt QTableView not displaying icons after update to PyQt 4.5.1

I'll try to be as clear as possible, though this is all a bit muddled in my head. I have a PyQt application that has been working for about a year now. After updating to PyQt 4.5.1 (from 4.3.3) none of my icons appear in the QTableView anymore (this update was concurrent with an update to python 2.6.5 from 2.5.1). Reverting to the old...