Re: [Interest] how to restart QProcess after it fails?

2019-06-01 Thread Frank Rueter | OHUfx
Thanks Thiago, that seems to have solved it, i.e. having the slot call a single shot timer which triggers the re-run. Cheers, frank On 2/06/19 4:09 AM, Thiago Macieira wrote: On Saturday, 1 June 2019 00:26:49 PDT Frank Rueter | OHUfx wrote: I also connect QProcess.stateChanged to another

[Interest] how to restart QProcess after it fails?

2019-06-01 Thread Frank Rueter | OHUfx
Hi all, I am using QProcess to launch an external application. The main part work without trouble, but I need to check for license errors and if one occurred, I need would like to restart the existing process with all it's environment settings and signal connections a certain number of times.

Re: [Interest] PySide2 installer for windows?

2019-05-22 Thread Frank Rueter | OHUfx
I do understand, but a few months ago we were able to run this to install a PySide2 version that works just fine: pip install --index-url=http://download.qt.io/snapshots/ci/pyside/5.6/latest/ pyside2 --trusted-host download.qt.io We only need this for a single inhouse app we use every day

Re: [Interest] [PySide] PySide2 installer for windows?

2019-05-21 Thread Frank Rueter | OHUfx
PM, Frank Rueter | OHUfx wrote: I know that, the problem is I work in an industry that has been clinging onto Python 2.7 with al their major softwares for way too long, it has not been my choice. As do I, and as do many others.  Python 2.7.x is not simply going to disappear with a *POOF* on 1

Re: [Interest] [PySide] PySide2 installer for windows?

2019-05-20 Thread Frank Rueter | OHUfx
thanks for the links though!! On 20/05/19 6:26 PM, Florian Bruhin wrote: Hi, On Mon, May 20, 2019 at 12:07:42PM +1200, Frank Rueter | OHUfx wrote: So the only way out of this is update my code to Python3? You might want to consider doing that anyways, if you haven't yet. Python 2 is EOL

Re: [Interest] [PySide] PySide2 installer for windows?

2019-05-20 Thread Frank Rueter | OHUfx
I know that, the problem is I work in an industry that has been clinging onto Python 2.7 with al their major softwares for way too long, it has not been my choice. On 20/05/19 6:26 PM, Florian Bruhin wrote: Hi, On Mon, May 20, 2019 at 12:07:42PM +1200, Frank Rueter | OHUfx wrote: So

Re: [Interest] [PySide] PySide2 installer for windows?

2019-05-19 Thread Frank Rueter | OHUfx
Yes, that is exactly what I'm trying to do. So the only way out of this is update my code to Python3? On 05/17/2019 05:35 PM, Jordan Hueckstaedt wrote: I had a similar error a few weeks ago. Are you by any chance trying to install PySide2 on python 2.7 on Windows? I found out the hard way

[Interest] PySide2 installer for windows?

2019-05-16 Thread Frank Rueter | OHUfx
Hi all, we are trying to install PySide2 on Windows 10. We tried installers from here http://download.qt.io/snapshots/ci/pyside/5.9/latest/pyside2/ and here http://download.qt.io/snapshots/ci/pyside/5.12/latest/pyside2/ But neither seem to work. I remember just running a pip install last

Re: [Interest] QWizard - can't register a field with a custom property

2019-03-20 Thread Frank Rueter | OHUfx
: |self.notes_widget.messageWidget.textChanged.connect(self.test) def test(self): print self.notes_widget.messageWidget.toPlainText() | What am I missing? Cheers, frank On 20/03/19 10:08 AM, Frank Rueter | OHUfx wrote: Hi all, In a QWizard page I am trying to register a field with a widget’s custom

Re: [Interest] [PySide] QListView - make tab key behave like enter key

2019-03-19 Thread Frank Rueter | OHUfx
. On 19/03/19 6:35 PM, Frank Rueter | OHUfx wrote: Hi all, I have a simple QListView in which I would like to edit items by clicking into empty space, typing, then hitting either enter or tab. I’d like the tab Key_Tab event to behave exactly like Key_Enter event, but it’s a bit stubborn. When

[Interest] QWizard - can't register a field with a custom property

2019-03-19 Thread Frank Rueter | OHUfx
Hi all, In a QWizard page I am trying to register a field with a widget’s custom property to supply the desired field value but I can’t get it to work. This is the line I am using to register the field and to link it to the signal that informs the field to update it’s value:

[Interest] QListView - make tab key behave like enter key

2019-03-18 Thread Frank Rueter | OHUfx
Hi all, I have a simple QListView in which I would like to edit items by clicking into empty space, typing, then hitting either enter or tab. I’d like the tab Key_Tab event to behave exactly like Key_Enter event, but it’s a bit stubborn. When I hit tab while editing an item (i.e. editor is

Re: [Interest] QComboBox - rect of actual menu vs widget area

2019-01-17 Thread Frank Rueter | OHUfx
but back to the original question: How would I get the correct height for the dark grey box below to only be visible inside the menu area? Maybe I can simply mask it through the menu area somehow? On 9/01/19 1:22 AM, Roland Hughes wrote: On 1/8/2019 4:00 AM, Matthew Woehlke wrote: On

Re: [Interest] QComboBox - rect of actual menu vs widget area

2019-01-07 Thread Frank Rueter | OHUfx
Thanks, will check it out and try to transfer to PySide2 On 8/01/19 9:43 AM, Matthew Woehlke wrote: On 29/12/2018 07.54, Roland Hughes wrote: Method 1: show/hide interesting widget Place a label with the animated GIF at the exact same spot as the combo box. An *animated GIF*? Ugh. No

Re: [Interest] QComboBox - rect of actual menu vs widget area

2019-01-07 Thread Frank Rueter | OHUfx
Thanks. I am not sure I agree with your dislike of overriding the paint method. I have actually had to do this a lot for custom UIs an in some cases even did it to make widgets more efficient. I do agree that I prefer not to in cases like this though, so thanks for your suggestions. Cheers,

[Interest] QComboBox - rect of actual menu vs widget area

2018-12-28 Thread Frank Rueter | OHUfx
Hi, I am trying to draw a simple busy indicator into a QCombobox while it's being populated with items. I thought I'd use with a custom paint event that checks is a certain condition is true, and if so it will draw custom stuff in to the menu, otherwise it just does it's default thing and

Re: [Interest] efficient natural sorting

2018-11-15 Thread Frank Rueter | OHUfx
I never have a' Original number" as the strings come from file names and another app. QCollator is the ticket. Cheers, frank On 15/11/18 4:14 AM, Shawn Rutledge wrote: On 14 Nov 2018, at 03:28, Frank Rueter | OHUfx wrote: Hi, I need to use the QSortFilterProxyModel to sort st

Re: [Interest] efficient natural sorting

2018-11-15 Thread Frank Rueter | OHUfx
Ha, QCollator is the perfect solution, thank you! I was not aware of that one. Cheers, frank On 15/11/18 3:57 AM, Giuseppe D'Angelo via Interest wrote: Hi, Il 14/11/18 03:28, Frank Rueter | OHUfx ha scritto: This works nicely but I’m wondering if it’s reliable and efficient to implement

[Interest] efficient natural sorting

2018-11-13 Thread Frank Rueter | OHUfx
Hi, I need to use the QSortFilterProxyModel to sort strings with numbers in them, i.e. perform natural sorting. I found this snippet online: |import re def atoi(text): return int(text) if text.isdigit() else text def natural_keys(text): return [atoi(c) for c in re.split('(\d+)', text)] l =

Re: [Interest] error when trying to emit custom object via QObject.Signal

2018-08-27 Thread Frank Rueter | OHUfx
your QRunnable). So the signal will probably be queued adn therefore will need to copy the arguments to the signals. On Mon, 27 Aug 2018 at 05:14, Frank Rueter | OHUfx <mailto:fr...@ohufx.com>> wrote: Hi all, I am trying to emit a custom object via QObject.Signal from inside a Q

[Interest] error when trying to emit custom object via QObject.Signal

2018-08-27 Thread Frank Rueter | OHUfx
Hi all, I am trying to emit a custom object via QObject.Signal from inside a QRunnable. The object I am trying to emit throws this error: TypeError: Value types used on meta functions (including signals) need to be registered on meta type: /NameSpace:://NameSpace/::Clip I tried to

Re: [Interest] crash when using multiple setSectionResizeMode() calls in QTableView

2018-08-15 Thread Frank Rueter | OHUfx
with a QHeaderView require a model to be present. If you move these calls to after a model has been set, everything works. https://gist.github.com/enkore/727e3f912c8f9380017fb78591f2a05e -Marian On 8/15/18 2:34 AM, Frank Rueter | OHUfx wrote: Hi, I isolated the problem into a small snippet: https

Re: [Interest] crash when using multiple setSectionResizeMode() calls in QTableView

2018-08-14 Thread Frank Rueter | OHUfx
of |header.setStretchLastSection(True) | but I need the second last section to stretch while the last one remains a fixes size. Is there a way to do this or do I have to write my own header view for that? Cheers, frank On 14/08/18 12:17 PM, Frank Rueter | OHUfx wrote: Thanks for testing

Re: [Interest] crash when using multiple setSectionResizeMode() calls in QTableView

2018-08-13 Thread Frank Rueter | OHUfx
setSectionResizeMode snippet on a table model whose headerData() is the same as yours and it doesn't cause a crash for me. I don't think the other roles are required (at least to not have a crash). On 13.08.2018 11:30, Frank Rueter | OHUfx wrote: Thanks. My header data simply looks like this: |def

Re: [Interest] crash when using multiple setSectionResizeMode() calls in QTableView

2018-08-13 Thread Frank Rueter | OHUfx
to implement size hint roles?! I will try that tomorrow. Tanks for the tip! Cheers, frank Must be something in your code; I'd start by double-checking everything related to the header data in your model. -Marian On 13.08.2018 05:17, Frank Rueter | OHUfx wrote: Hi all, using PySide2 I am trying

[Interest] crash when using multiple setSectionResizeMode() calls in QTableView

2018-08-12 Thread Frank Rueter | OHUfx
Hi all, using PySide2 I am trying to set different resize modes for each of my columns in a table view, but as soon as I set more than one I get a crash. Here is what I do: |class MyView(QtWidgets.QTableView): def __init__(self, parent=None): super(MyView, self).__init__(parent) header =

Re: [Interest] get application's resources

2018-08-10 Thread Frank Rueter | OHUfx
Ah, nice one, thanks! I also just stumbled over this which seems to work as well: |QtCore.QResource(':qrc/images').children() | Two arrows in the quiver now, sweet. Thanks again, frank On 10/08/18 3:27 PM, Reinhardt Behm via Interest wrote: QDir is your friend. QDir dir(":/",

[Interest] get application's resources

2018-08-09 Thread Frank Rueter | OHUfx
Hi, in my host application I can use the existing application resources for things like icons etc like this:     QtGui.QIcon(':qrc/images/some_image.png') Is it possible to get a list of everything in the application resources to see what other images are available, i.e. everything under

Re: [Interest] problems with drag event in QListView with delegate in edit mode

2018-08-08 Thread Frank Rueter | OHUfx
Same issue with the context menu. I have to right lick twice before it opens. I have been trying to set focus and various states on the view but still can't get it right. Any help would be very much appreciated. Cheers, frank On 8/08/18 8:58 PM, Frank Rueter | OHUfx wrote: Hi all, I have

[Interest] problems with drag event in QListView with delegate in edit mode

2018-08-08 Thread Frank Rueter | OHUfx
Hi all, I have QListView with an item delegate that is animated when the mouse overs over it. This is done via a delegate using a custom widget and popping the index under the cursor into edit mode like so: |def mouseMoveEvent(self, event): if index.isValid(): # start playing playing under

Re: [Interest] QListView with delegate: support drag outside of QApplication

2018-08-04 Thread Frank Rueter | OHUfx
= QtGui.QSplitter() w.addWidget(list1) w.addWidget(list2) w.show() w.raise_() app.exec_() | On 31/07/18 9:13 PM, Frank Rueter | OHUfx wrote: Anybody? Been trying to play with the view's dragMoveEvent to take over the default drag event's mime data and create a custom QDrag instance

Re: [Interest] QListView with delegate: support drag outside of QApplication

2018-07-31 Thread Frank Rueter | OHUfx
the drag from scratch? It feels like there should be a more elegant solution, right?! Cheers, frank On 30/07/18 3:24 PM, Frank Rueter | OHUfx wrote: Hi all, I have an app that uses two QListViews with delegates. The user can drag ad drop items from one view into the other to create something like

[Interest] QListView with delegate: support drag outside of QApplication

2018-07-29 Thread Frank Rueter | OHUfx
Hi all, I have an app that uses two QListViews with delegates. The user can drag ad drop items from one view into the other to create something like a shopping list. So far so good. Now I need to enable the user to also drag an item out of the application entirely. Is it possible to access

Re: [Interest] sizeHint for delegates not wqorking

2018-07-03 Thread Frank Rueter | OHUfx
Ah, thanks a lot! That did indeed fix it. Cheers, frank On 3/07/18 11:56 PM, Francis Herne wrote: On Tuesday, 3 July 2018 03:11:42 BST Frank Rueter | OHUfx wrote: Hi all, I am having trouble controlling my table view’s column sizes. I thought implementing the delegate’s sizeHint was a way

[Interest] sizeHint for delegates not wqorking

2018-07-02 Thread Frank Rueter | OHUfx
Hi all, I am having trouble controlling my table view’s column sizes. I thought implementing the delegate’s sizeHint was a way to do this but it won’t work for me. Can somebody please point out what I’m missing? Here is my test code: |from PySide2 import QtWidgets from PySide2 import QtCore

Re: [Interest] QTableView - only trigger edit event in lower part of cell

2018-05-01 Thread Frank Rueter | OHUfx
Ah, looks like my approach was correct but I had not turned off edit triggers properly, so those were interfering with the expected behaviour. On 1/05/18 8:21 PM, Frank Rueter | OHUfx wrote: Hi, I have spent several hours trying to get this right but seem to be failing: I have a QTableView

[Interest] QTableView - only trigger edit event in lower part of cell

2018-05-01 Thread Frank Rueter | OHUfx
Hi, I have spent several hours trying to get this right but seem to be failing: I have a QTableView (which uses a QAbstractTableModel) and a custom delegate which takes care of the cell painting. At the bottom of each cell I need a combo box which I want editable by a single click, so no

[Interest] make QCompleter behave like terminal compleetion

2017-10-18 Thread Frank Rueter | OHUfx
Hi all, I am trying to make a QLineEdit behave like a terminal in terms of auto completing file paths when hitting the tab key. I found this article but it only gets me half way there. The tab key does work with this

Re: [Interest] building a light weight tree model

2017-05-03 Thread Frank Rueter | OHUfx
dré Somers wrote: Hi, Op 03/05/2017 om 00:18 schreef Frank Rueter | OHUfx: Thanks for the tip. I don't know C++ so that's not an option, but I can Cythonise and compile later. Actually, I started with a command line app that just printed out a report. In my analysis I need to visit ev

Re: [Interest] building a light weight tree model

2017-05-02 Thread Frank Rueter | OHUfx
09:15 schreef Frank Rueter | OHUfx: I need a few custom views for my data, including representing collections of files with a certain extension as virtual zip files, i.e. items that don't actually exist on disk. So, use a proxy model or a model that wraps the original one. I assumed using QFileSyste

Re: [Interest] building a light weight tree model

2017-05-02 Thread Frank Rueter | OHUfx
read in the past). On 2/05/17 6:25 PM, Ch'Gans wrote: On 2 May 2017 at 17:55, Frank Rueter | OHUfx <fr...@ohufx.com <mailto:fr...@ohufx.com>> wrote: Hi all, Here is a snippet of test code to mimic a light weight tree model. All it is trying to do is mimic the parenti

[Interest] building a light weight tree model

2017-05-01 Thread Frank Rueter | OHUfx
Hi all, Here is a snippet of test code to mimic a light weight tree model. All it is trying to do is mimic the parenting according to the directory structure on disk using QStandardItems in a QStandardModel. It works, but it took me way longer to figure out than I expected, and I have a

Re: [Interest] CSS based pie chart ignored in QWebView

2017-05-01 Thread Frank Rueter | OHUfx
Ok, thanks. I got it to work. I don't know what I did wrong yesterday but it seems to be fine now. Cheers, frank On 1/05/17 8:44 PM, Konstantin Tokarev wrote: 01.05.2017, 10:03, "Frank Rueter | OHUfx" <fr...@ohufx.com>: Hi, I was hoping to utilise a CSS based pie chart

[Interest] CSS based pie chart ignored in QWebView

2017-05-01 Thread Frank Rueter | OHUfx
Hi, I was hoping to utilise a CSS based pie chart like this in my QWebView to print some reports. I copied the css code from the above example to my already implemented local CSS file, but the pie chart wont' display in the QWebView (other css

Re: [Interest] OverflowError when setting datat on QStandardItem

2017-04-28 Thread Frank Rueter | OHUfx
Looks like explicitly casting to long() seems to work. e.g.: i.setData(long(13003676769), QtCore.Qt.UserRole+1) On 29/04/17 3:41 PM, Frank Rueter | OHUfx wrote: Hi, I am traversing a directory collecting file sizes in bytes and assigning them as custom data to QStandardItems

[Interest] OverflowError when setting datat on QStandardItem

2017-04-28 Thread Frank Rueter | OHUfx
Hi, I am traversing a directory collecting file sizes in bytes and assigning them as custom data to QStandardItems. Unfortunately I get an OverflowError when trying to set too large a number it would seem: i = QtGui.QStandardItem() i.setData(13003676769, QtCore.Qt.UserRole+1) 

Re: [Interest] changing colours for progressbar with GTK style

2017-04-28 Thread Frank Rueter | OHUfx
the set QPalette into account or to ignore it. The last time I checked the GTK style completely ignores it. I cannot check right know, but I think it is because it follows the GTK theme of your system. BR, Benjamin 2017-04-28 10:54 GMT+02:00 Frank Rueter | OHUfx <fr...@ohufx.com <mai

[Interest] changing colours for progressbar with GTK style

2017-04-28 Thread Frank Rueter | OHUfx
Hi, I have a QProgressBar set to GTK like this: self.pBar = QtGui.QProgressBar() self.pBar.setRange(0, 0) self.pBar.setStyle(QtGui.QStyleFactory.create('GTK')) I like the subtle colour pulsing from dark blue to light blue for a busy bar better than the traveling blocks. However, the default

Re: [Interest] I feel stupid: QStandardItem::insertRows: Ignoring duplicate insertion of item

2017-04-26 Thread Frank Rueter | OHUfx
gt;: |view =QtGui.QTreeView()view.setModel(model)view.expandAll()view.setIndentation(0)view.header().hide()| I haven't tries it yet but it looks like it's perfect for my need. Just wanted to post it here for posterity. Cheers, frank On 27/04/17 1:29 PM, Frank Rueter | OHUfx wrote: So I read

Re: [Interest] I feel stupid: QStandardItem::insertRows: Ignoring duplicate insertion of item

2017-04-26 Thread Frank Rueter | OHUfx
hus yields the expected tree view. Is this possible to do through a proxy model? I have only ever used a QSortFilterProxy so far. Thanks, frank On 27/04/17 3:47 AM, Kevin Funk wrote: On Wednesday, 26 April 2017 21:32:13 CEST Frank Rueter | OHUfx wrote: You are dead right as my follow up email con

Re: [Interest] I feel stupid: QStandardItem::insertRows: Ignoring duplicate insertion of item

2017-04-26 Thread Frank Rueter | OHUfx
Thanks Kevin, I will read up on that. On 27/04/17 3:47 AM, Kevin Funk wrote: On Wednesday, 26 April 2017 21:32:13 CEST Frank Rueter | OHUfx wrote: You are dead right as my follow up email confirms. Now the question is how to use the same (parented) item in a tree view and a list view. That's

Re: [Interest] I feel stupid: QStandardItem::insertRows: Ignoring duplicate insertion of item

2017-04-26 Thread Frank Rueter | OHUfx
You are dead right as my follow up email confirms. Now the question is how to use the same (parented) item in a tree view and a list view. I guess I will be RTFM-ing a bit. Cheers, frank On 26/04/17 9:24 PM, Kevin Funk wrote: On Wednesday, 26 April 2017 19:50:54 CEST Frank Rueter | OHUfx

Re: [Interest] I feel stupid: QStandardItem::insertRows: Ignoring duplicate insertion of item

2017-04-26 Thread Frank Rueter | OHUfx
parenting): itemA |___itemB |itemC Do I need two models and communicate between them (e.g. if a user renames an item)? Or can this be achieved with a single model? Thanks, frank On 26/04/17 7:50 PM, Frank Rueter | OHUfx wrote: Hi, I seem to run into this issue a lot and I

[Interest] I feel stupid: QStandardItem::insertRows: Ignoring duplicate insertion of item

2017-04-26 Thread Frank Rueter | OHUfx
Hi, I seem to run into this issue a lot and I don't get why: I have a list of sub-classed QStandardItems that another processor generated, and I want to add them to a QStandardItemModel like this: for item in myItemList: self.model.appendRow(item) The model is empty and hasn't been used

Re: [Interest] QListWidgetItem selection border too large

2017-04-04 Thread Frank Rueter | OHUfx
://codereview.qt-project.org/#/c/150307/ in Qt 5.6. See also https://bugreports.qt.io/browse/QTBUG-50645 On Apr 4, 2017, at 1:59 PM, Frank Rueter | OHUfx <fr...@ohufx.com> wrote: Hi, I have two QListWidgets living in a QSplitter. I need the items to be editable. Some of the item labels are longe

[Interest] QListWidgetItem selection border too large

2017-04-04 Thread Frank Rueter | OHUfx
Hi, I have two QListWidgets living in a QSplitter. I need the items to be editable. Some of the item labels are longer than the visible label. When I edit one, it's selection border extends right across the splitter like this: It seems that the selection box is as large as the longest item

Re: [Interest] QObject.destroyed() not working?!

2017-03-27 Thread Frank Rueter | OHUfx
the order in which destructors should be called. I believe starting with Python 3.4, finalizers are always called. On 27 Mar 2017, at 03:52, Frank Rueter | OHUfx <fr...@ohufx.com> wrote: Hi, I'm pretty sure I'm misinterpreting how this should work so maybe you guys can help: I have a Q

Re: [Interest] QObject.destroyed() not working?!

2017-03-27 Thread Frank Rueter | OHUfx
Thanks Thiago, that makes sense. Cheers, frank On 27/03/17 7:48 PM, Thiago Macieira wrote: On domingo, 26 de março de 2017 18:52:48 PDT Frank Rueter | OHUfx wrote: Hi, I'm pretty sure I'm misinterpreting how this should work so maybe you guys can help: I have a QObject which I would like

[Interest] QObject.destroyed() not working?!

2017-03-26 Thread Frank Rueter | OHUfx
Hi, I'm pretty sure I'm misinterpreting how this should work so maybe you guys can help: I have a QObject which I would like to run a simple clean up job just before it's destroyed. I thought I could simply do this in it's constructor: self.destroyed.connect(self.__cleanUp) Then have

Re: [Interest] using QSetting when host application is using it as well

2017-02-06 Thread Frank Rueter | OHUfx
ever place for configuration files is somewhere under either "C:\Users\\AppData\Local" or "C:\Users\\AppData\Roaming". It's somewhat like storing settings in "~/." instead of "~/.config/" on *nix. On 02/03/2017 06:20 AM, Frank Rueter | OHUfx wrote:

Re: [Interest] using QSetting when host application is using it as well

2017-02-02 Thread Frank Rueter | OHUfx
ings solution though. Cheers, frank On 2/02/17 4:51 PM, Frank Rueter | OHUfx wrote: Hi all, I have been using QSettings for reading/writing user settings. All works well until I run my (PySide) application inside a host application that is also written in QT, and which also uses the QSettings object.

Re: [Interest] using QSetting when host application is using it as well

2017-02-01 Thread Frank Rueter | OHUfx
On 2/02/17 4:51 PM, Frank Rueter | OHUfx wrote: Hi all, I have been using QSettings for reading/writing user settings. All works well until I run my (PySide) application inside a host application that is also written in QT, and which also uses the QSettings object. I am now struggling

[Interest] using QSetting when host application is using it as well

2017-02-01 Thread Frank Rueter | OHUfx
Hi all, I have been using QSettings for reading/writing user settings. All works well until I run my (PySide) application inside a host application that is also written in QT, and which also uses the QSettings object. I am now struggling to understand how I can properly differentiate

Re: [Interest] TypeError during cythonize

2017-01-26 Thread Frank Rueter | OHUfx
, Frank Rueter | OHUfx <fr...@ohufx.com <mailto:fr...@ohufx.com>> wrote: Hi all, I have run into this issue a couple of times now: Some of my class declarations look like this: class DBTaskQueue(QtCore.QObject): def __init__(self, npdbInstance, task=None, parent=None):

[Interest] TypeError during cythonize

2017-01-25 Thread Frank Rueter | OHUfx
Hi all, I have run into this issue a couple of times now: Some of my class declarations look like this: class DBTaskQueue(QtCore.QObject): def __init__(self, npdbInstance, task=None, parent=None): super(DBTaskQueue, self).__init__(parent) This works fine when run as

Re: [Interest] QThreadPool functionality for QThreads

2017-01-20 Thread Frank Rueter | OHUfx
QRunnables with QThreadPool seem to work great in my case. I am instantitating my main worker class inside the QRunnable now to be able send signals via that (e.g. runnable.worker.signal.emit()). I tried multiple inheritance to just have one QRunnable class that can emit signals, but that

Re: [Interest] QThreadPool - global instance or custom one

2017-01-20 Thread Frank Rueter | OHUfx
it a pool of it's own. If not, you can share. Bo. 2017-01-20 4:44 GMT+01:00 Frank Rueter | OHUfx <fr...@ohufx.com <mailto:fr...@ohufx.com>>: Great, thanks for the quick reply and confirmation. One more question: Would you create one QThreadPool instance for the entire

Re: [Interest] QThreadPool - global instance or custom one

2017-01-19 Thread Frank Rueter | OHUfx
-feira, 20 de janeiro de 2017 11:59:31 PST Frank Rueter | OHUfx wrote: Hi all, I have started using QThreadPool for the first time and am wondering if it's save/recommended to create my own instance of it or to always use the global instance? The rule I use is that you should use your own pool

[Interest] QThreadPool - global instance or custom one

2017-01-19 Thread Frank Rueter | OHUfx
Hi all, I have started using QThreadPool for the first time and am wondering if it's save/recommended to create my own instance of it or to always use the global instance? I.e. the docs all tend to refer to the global instance but they don't say anything about creating your own. Are there

Re: [Interest] QThreadPool functionality for QThreads

2017-01-18 Thread Frank Rueter | OHUfx
Thanks Elvis, much appreciated! On 19/01/17 7:55 PM, Elvis Stansvik wrote: 2017-01-19 1:10 GMT+01:00 Thiago Macieira : On quarta-feira, 18 de janeiro de 2017 20:04:41 PST Elvis Stansvik wrote: If you have one QThread that depends on the completion of another, then

Re: [Interest] QThreadPool functionality for QThreads

2017-01-18 Thread Frank Rueter | OHUfx
OK, thanks Thiago and Elvis. I think I got the picture now and can proceed knowing I'm not heading into a dead end. Cheers, frank On 19/01/17 1:10 PM, Thiago Macieira wrote: On quarta-feira, 18 de janeiro de 2017 20:04:41 PST Elvis Stansvik wrote: If you have one QThread that depends on the

Re: [Interest] QThreadPool functionality for QThreads

2017-01-18 Thread Frank Rueter | OHUfx
, thanks for the tip. Cheers, frank On 19/01/17 8:12 AM, Elvis Stansvik wrote: 2017-01-18 20:11 GMT+01:00 Elvis Stansvik <elvst...@gmail.com>: 2017-01-18 20:04 GMT+01:00 Elvis Stansvik <elvst...@gmail.com>: 2017-01-18 8:17 GMT+01:00 Frank Rueter | OHUfx <fr...@ohufx.com>:

Re: [Interest] QThreadPool functionality for QThreads

2017-01-17 Thread Frank Rueter | OHUfx
wrote: On quarta-feira, 18 de janeiro de 2017 17:21:46 PST Frank Rueter | OHUfx wrote: Hi, I got another threading question for the pros out there: In my current application I am using QThread objects and QObject.moveToThread() to enable my GUI to download multiple files while updating progres

[Interest] QThreadPool functionality for QThreads

2017-01-17 Thread Frank Rueter | OHUfx
Hi, I got another threading question for the pros out there: In my current application I am using QThread objects and QObject.moveToThread() to enable my GUI to download multiple files while updating progress bars in the main event loop. This is the respective snippet of code:

Re: [Interest] QWebView and Joomla pages

2017-01-14 Thread Frank Rueter | OHUfx
I go tit working now by adding the header data back into the downloaded html. Thanks a lot Kai! frank On 15/01/17 2:22 PM, Frank Rueter | OHUfx wrote: Hi Kai, my apologies for not replying earlier! Thank you for the explanation, so it sounds like its "should just work". After re

Re: [Interest] QWebView and Joomla pages

2017-01-14 Thread Frank Rueter | OHUfx
sHeaders + html) Those particular css files don't give me what I'm aft so I need to dig up the correct one, but should this work? Cheers, frank On 12/01/17 11:29 PM, Kai Koehne wrote: -Original Message----- From: Frank Rueter | OHUfx [mailto:fr...@ohufx.com] Sent: Thursday, January 12, 2017

[Interest] QWebView and Joomla pages

2017-01-11 Thread Frank Rueter | OHUfx
Hi all, this may be a long shot but i don't quite know where else to get help: I am trying to use QWebView to display a part of a Joomla page like this one. Trouble is that I can't figure out how to deal with the required css files to

Re: [Interest] suppressing tooltips of all widgets

2017-01-11 Thread Frank Rueter | OHUfx
and leave events to install and remove the filter I guess. On 12/01/17 1:43 PM, Frank Rueter | OHUfx wrote: DOH, ignore that last bit. I wrongly assumed that I need to install event filters to QApplication instances when in fact I can install them to any QObject. So there is no need to mess

Re: [Interest] suppressing tooltips of all widgets

2017-01-11 Thread Frank Rueter | OHUfx
DOH, ignore that last bit. I wrongly assumed that I need to install event filters to QApplication instances when in fact I can install them to any QObject. So there is no need to mess with enter and leave events. Nice On 12/01/17 1:35 PM, Frank Rueter | OHUfx wrote: Thanks guys, works

Re: [Interest] suppressing tooltips of all widgets

2017-01-11 Thread Frank Rueter | OHUfx
. But that should be ok, right?! Thanks again! frank On 12/01/17 1:13 PM, william.croc...@analog.com wrote: On 01/11/2017 06:37 PM, Frank Rueter | OHUfx wrote: Thanks Giuseppe, I will check out both those options and report back. On 12/01/17 12:15 PM, Giuseppe D'Angelo wrote: Il 12/01/2017 00:02, Frank

Re: [Interest] suppressing tooltips of all widgets

2017-01-11 Thread Frank Rueter | OHUfx
Thanks Giuseppe, I will check out both those options and report back. On 12/01/17 12:15 PM, Giuseppe D'Angelo wrote: Il 12/01/2017 00:02, Frank Rueter | OHUfx ha scritto: Is there any way to intercept a any tool tip even from anywhere in the app? Install a global event filter on QApplication

[Interest] suppressing tooltips of all widgets

2017-01-11 Thread Frank Rueter | OHUfx
Hi all, what is the best way to suppress tool tips for all widgets in an app? I have been asked to implement a user preference for showing tool tips and am reluctant to modify every single widget to check the preference before showing the tooltip. I had hoped that I can maybe intercept the

[Interest] suppressing "modalSession has been exited prematurely - check for a reentrant call to endModalSession:"

2017-01-10 Thread Frank Rueter | OHUfx
Hi all, happy 2017! In my current GUI code I have a few simple QDialogs that are called via their exec_() methods. Unfortunately with the version of QT that I have to use there is this bug that spits out this warning under OSX when such modal

[Interest] model/view: fetchMore with a QSortFilterProxyModel

2016-09-01 Thread Frank Rueter | OHUfx
Hi all, I'm implementing a model using fetchMore, to retrieve data from a model on demand, which in my case means the model fetches more data as the user scrolls down a QListView. Technically this works just fine, except that the scrollbar adjusts it's width every time it hits the bottom, to

Re: [Interest] QListView: drag custom item

2016-08-17 Thread Frank Rueter | OHUfx
shal the objects, to make them compatible to text, which can be passed to and from external applications. Viktor On 16.08.2016 23:56, Frank Rueter | OHUfx wrote: Anybody? I can find plenty of examples on how to drag items from a view to a widget but can't find anything about dragging a custom item

Re: [Interest] QListView: drag custom item

2016-08-16 Thread Frank Rueter | OHUfx
Rueter | OHUfx wrote: Hi, I am trying to get drag to work between two QListViews using a custom item. I can't find the info I need online other than this document <https://doc.qt.io/archives/4.6/model-view-dnd.html> which helped a little bit but now I'm stuck. Drag from one QListView to a

[Interest] QListView: drag custom item

2016-08-16 Thread Frank Rueter | OHUfx
Hi, I am trying to get drag to work between two QListViews using a custom item. I can't find the info I need online other than this document which helped a little bit but now I'm stuck. Drag from one QListView to another works fine when I

Re: [Interest] item edit on mouse over - was: dynamic widget creation in QScrollArea

2016-08-11 Thread Frank Rueter | OHUfx
is opened. On 12/08/16 2:12 PM, Frank Rueter | OHUfx wrote: So I made some progress here: I am now using the QListView's mouseMoveEvent() to get the item under the mouse and edit() it: def mouseMoveEvent(self, event): '''Find item under mouse and pop it into edit mode

Re: [Interest] item edit on mouse over - was: dynamic widget creation in QScrollArea

2016-08-11 Thread Frank Rueter | OHUfx
es anybody have an idea why that would be? Cheers, frank On 9/08/16 5:50 PM, Frank Rueter | OHUfx wrote: And one more follow up: I just tried this in my view class: def mouseMoveEvent(self, event): '''Find item under mouse and pop it into edit mode''' index = self.indexAt

Re: [Interest] item edit on mouse over - was: dynamic widget creation in QScrollArea

2016-08-09 Thread Frank Rueter | OHUfx
Hi Volker, that doesn't sound like a bad idea at all I think, though I'm no QT expert myself. I will try that tomorrow, thanks. On 9/08/16 5:57 pm, Volker Siepmann wrote: I'm quite new to qt, so please set me straight if this is nonsense: Can you use the blockSignals(True) method once the

Re: [Interest] item edit on mouse over - was: dynamic widget creation in QScrollArea

2016-08-08 Thread Frank Rueter | OHUfx
? Cheers, frank On 9/08/16 5:27 pm, Frank Rueter | OHUfx wrote: Ok, so after some more experimenting I am fairly certain that using seItemWidget inside the delegate's paint event is a bad idea. My second approach seems more promising so far: Using the custom movie player widget

Re: [Interest] item edit on mouse over - was: dynamic widget creation in QScrollArea

2016-08-08 Thread Frank Rueter | OHUfx
? Cheers, frank On 8/08/16 4:28 pm, Frank Rueter | OHUfx wrote: Hi Bo, I have followed your advise and gone back to QListView with a delegate. My first test was to render the custom widget I need via the delegate paint method. This populates a static version of the movie player (the custom widget I

Re: [Interest] dynamic widget creation in QScrollArea

2016-08-07 Thread Frank Rueter | OHUfx
nder(painter, QtCore.QPoint(option.rect.x(), option.rect.y())) def sizeHint(self, option, index): return MyMovie.thumbSize On 4/08/16 8:36 pm, Bo Thorsen wrote: Den 04-08-2016 kl. 10:05 skrev Frank Rueter | OHUfx: I am playing with the idea of writing a custom widget based on QScroll

Re: [Interest] dynamic widget creation in QScrollArea

2016-08-05 Thread Frank Rueter | OHUfx
Thanks Reto, I'm not entirely certain I understand your example (I'm using Python). I'm not quite sure yet how I would instantiate the widgets based on their visibility yet, but will think about it again if I can't get the QDelegate to work with animation. Cheers, frank On 5/08/16 1:09 am,

Re: [Interest] dynamic widget creation in QScrollArea

2016-08-05 Thread Frank Rueter | OHUfx
a QMovie instance that plays back on mouse over, has it's own QSlider to scrub through the movie and can be dragged/dropped. I will give it another shot and might be back for more help... Thanks, frank On 4/08/16 8:36 pm, Bo Thorsen wrote: Den 04-08-2016 kl. 10:05 skrev Frank Rueter | OHUfx

[Interest] dynamic widget creation in QScrollArea

2016-08-04 Thread Frank Rueter | OHUfx
Hi all, I am playing with the idea of writing a custom widget based on QScrollArea, where widgets are created as the user scrolls. I'm just hoping to bounce the general idea of you guys here to see if I'm heading in the right direction: I have a heap of custom widgets, potentially thousands,

Re: [Interest] mirroring and reversing QMovie

2016-07-13 Thread Frank Rueter | OHUfx
be more than happy to learn. This is what I got for so far: https://gitlab.com/snippets/22447 Cheers, frank On 07/14/2016 12:18 PM, Thiago Macieira wrote: Em quinta-feira, 14 de julho de 2016, às 11:41:12 PDT, Frank Rueter | OHUfx escreveu: Thanks. What I'm currently exploring is using

Re: [Interest] mirroring and reversing QMovie

2016-07-13 Thread Frank Rueter | OHUfx
considering my lack of experience with those sort of things but I will cross that bridge when I get there :) Cheers, frank On 14/07/16 3:46 am, Thiago Macieira wrote: Em quarta-feira, 13 de julho de 2016, às 14:09:33 PDT, Frank Rueter | OHUfx escreveu: Yup, I know all that, but once you cache

Re: [Interest] mirroring and reversing QMovie

2016-07-13 Thread Frank Rueter | OHUfx
julho de 2016 15:48:47 PDT Frank Rueter | OHUfx wrote: Hi all, I am wondering how to mirror a cached QMovie object horizontally and vertically and how to play it in reverse. Is this even achievable with QMovie? If not could it be achieved by manipulating the IODevice somehow? I can't find a single

[Interest] mirroring and reversing QMovie

2016-07-11 Thread Frank Rueter | OHUfx
Hi all, I am wondering how to mirror a cached QMovie object horizontally and vertically and how to play it in reverse. Is this even achievable with QMovie? If not could it be achieved by manipulating the IODevice somehow? I can't find a single thing online about this sort of thing. Cheers,

  1   2   >