Last week I started to learn Python and I developed some command line apps. Now I would like to develop apps with GUI. I searched in internet and I found a project that fits my needs: Qt Project (http://qt-project.org) and PyQt (http://www.riverbankcomputing.com/software/pyqt/intro). I installed Qt 5.3.2 Open Source, SIP 4.16.4, PyQt5 5.3.2 on Mac OS X 10.10 and python 2.7.6.
Tag: qt
How to disable selection highlighting in a QTableWidget
I have a QTableWidget with a disabled setSelectionMode (QTableWidget::NoSelection) and the QTableWidgetItems I fill in don’t have the Qt::ItemIsEditable flag. Nevertheless, a cell that has been clicked gets some kind of cursor (the black line at the bottom in my case): How can I disable this “cursor”? Answer Does this help? To elaborate a bit: the appearance of the items
Print Javascript Exceptions In A QWebView To The Console
I’m using PyQt4 and a QWebView widget to view a webpage, but it appears as though there is a problem with my Javascript. Other browsers seem to run ok, so I would like to know if any exceptions are occurring by printing them to the console. The code I’m using is below. What do I need to add to do
What is the correct way to make my PyQt application quit when killed from the console (Ctrl-C)?
What is the correct way to make my PyQt application quit when killed from the console (Ctrl-C)? Currently (I have done nothing special to handle unix signals), my PyQt application ignores SIGINT (Ctrl+C). I want it to behave nicely and quit when it is killed. How should I do that? Answer 17.4. signal — Set handlers for asynchronous events Although
PyQt: removing QTreeView columns
I am using QTreeView with QFileSystemModel. It displays columns like Size, Type, Modification Date, which I don’t need. How can I remove them from the view? I can’t find any removeColumn in model or in view. Answer Get the QHeaderView of your TreeView by calling header() on it, the headerview knows about the columns and can hide them via hideSection.