Greetings All,
Doing some prototyping where I have a simple QTreeWidget with 3 items.
Each item has 3 simple children.
Using QTreeWidget.setItemWidget()I "set/insert" a simple QTableWidget into
a child of one of the tree's parent items (first column)
The problem is that the "child-table"
A great "Thank You" to Andreas and Kovid for both of your expert-level feedback
on this...
Since Andrea suggest the bug may be in Qt,...I will post to that forum as
well...
but think I might wait a day or so to hear what others may say and weigh-in
with
their expertise before propagating to
whoops,...correction
I typed "fancybrowser.py" but I actually meant "formextractor.py"
Thanks,
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Howdy,
I believe Guru Hans-Peter ;-) posted a collection of PyQt examples that
he converted into Python from the Qt C++ examples..
In one titled "fancybrowser.py"
There's a few lines that read...
@QtCore.pyqtSlot()
def submit(self):
frame = self.ui.webView.page().m
of sip/PyQt ?
(in a Python 2.6 world)
Thank you guys very much for responding,
Cheers,
Jim
From: Hans-Peter Jansen
To: James Polk
Sent: Friday, December 2, 2011 12:40 AM
Subject: Re: [PyQt] Version matching: Qt and PyQt
Am Friday 02 December 2011 03:13
Is there a online guide anywhere to match a version of Qt with it's
corresponding
version of PyQt ?
For example,...on Windows, in order to work with Maya2011, I had to install
Qt 4.5.3 and use PyQt 4.7.3 (and sip too)
Is there a lookup table somewhere where these versions are matched up?
No
Hello,
A while back, wrote some kinda' simple code to simply move/animate QLabels
from left to right, or right to left. Wrote it on WinXP 64bit and it ran fine.
Went to run it on WinXP 32bit, and it doesn't execute the same, meaning
QLabels end up in wrong position,...close, but off...
Basical
Howdy All,
I have a situation regarding threading that I'm hoping that you gurus can
advise on,...
I'm doing a UI where I spawn a second, threaded processthe child process
affects the parent process by altering the parent's behaviour and/or animation
timing.
Using modules "threading" and
Aside from the "depth" modifiers in the email subject,..
Are there any other, more specific, ways to alter, control, and/or modify a
UI's "depth" ?
It would be great if there is some kind of numerical value to read/write
somewhere...
If the commands above *aren't* used,...is depth established
Ahhh!I found the problem
I was narrowing down my code to a send a more simpler example UI,..
I deleted a bunch of stuff, and it worked,going back and
analyzing step-by-step,...setting the app "style" is the culprit...
Specifically,
--> app.setStyle("Plastique")
I'm (unfortunately
Thanks for the responses,...
I'll send an example UI later today, but I do use Layouts...of all kinds..
I'll take a look at the tutorials, but I doubt it'll address what I'm seeing,..
which appears to me to be more of a versioning issue...or a difference
between Python and C/C++ interpretation..
I like Designer and have been using it more and more...
but I've been noticing that many times what you see in the Designer window
ends up not matching when you run your program later.
For example, small offsets in X and Y...look good in Designer, but don't end
up in the same place in the program
Apologies if this is too off-topic,but I'd like to propose a discussion of
how-to's and where-fore's regarding distributing python modules to a user-base.
Recently, I've been using Mark Hammond's excellent pywin32 packages,
along with NumPy and PyOpenGL,etc. I have a user-base of approx 40
Let's say you create a QLabel and make it an icon, by associating an image file
to it,..
like..
thisPixmap = QtGui.QPixmap('server:/images/airplane.jpg') )
thisIcon = QtGui.QLabel(self)
thisIcon.setPixmap(thisPixmap)
Now let's say that later, in another function...you need t
Howdy,
I'm using PyQt mostly in conjunction with Maya, but also for standalone
applications.
I have a situation where from within Maya, I launch a PyQt app that uses sip's
"wrapinstance" command. I'm creating a Maya-derived graphical entity and
parenting
it into the PyQt window. I've done this
Howdy,
Anybody have any experiences or words of wisdom to share concerning how to
have a QTreeView/QFileSystemModel automatically expand from entirely closed (on
startup)
to a certain specified directory ?
Was hoping for a single command,...but preliminary research looks like a
recursive
techn
Anyone have any experience working with,tweeking, and/or creating new
app color schemes?...the one's specificed with "app.setStyle()"...
Of the released ones:
"Plastique",
"CDE",
"motif",
"SGI",
"Windows",
"CleanLooks",
"Mac"
is there a way to tweek the colors in these? Where are they found?
Can
That's Cool!...Thanks Paul!
--- On Tue, 4/19/11, Paul Du Bois wrote:
From: Paul Du Bois
Subject: RE: [PyQt] Question on QTreeView, interactive expanding/collapsing
To: "James Polk" , pyqt@riverbankcomputing.com
Date: Tuesday, April 19, 2011, 3:25 PM
If you need hotkey+cli
Whoops,...just found the *-hotkey,nevermind, lol...
--- On Tue, 4/19/11, James Polk wrote:
From: James Polk
Subject: Question on QTreeView, interactive expanding/collapsing
To: pyqt@riverbankcomputing.com
Date: Tuesday, April 19, 2011, 2:09 PM
Greetings All,
In a typical QTreeView
Greetings All,
In a typical QTreeView,...the default behaviour of clicking on a "plus box",
i.e. the branch boxes of the tree, yields a "single box open", or in the case
of collapsing, a "single box closed" event.
Is there any way to use a keyboard modifier, like SHIFT, CTRL, and/or ALT,
to expa
hmmm, I'm not finding a match() function for either QTreeView nor
QAbstractItemView...
For many good code examples, try www.nullege.com
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
...and just to cleanup and clarify,
in "ms.py", I had to go back and edit it to be:
global MyTreeView
instead of just simply "MyTreeView" which I wrote before...
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com
Well I found a solution and thought I would share it...
Probably not the most elegant, but it does work..
Works by using an import global variable (told you it wasn't elegant ;-)
I created a file named "ms.py" and inside is a single line:
MyTreeView
and that's all.
In my main.py,...I "im
I have a curious dilemma I can't seem to find any information about in the
docs...
I have a QTreeView and a delegate...
The items in the QTreeView have columns of similar data. When I set the
selection behaviour to multiSelect (actually called ExtendedSelect) I can pick
a single column of numbe
Greetings All,
I have a database that is organized into a structured hierarchy, much like a
typical directory tree full of files and folders. I need to load this database
into
a QTreeView for viewing and possible editing.
I've seen examples using os.walk() where it parses a real directory tree
del/view items,
(Kudos to Pete ;-) it doesn't appear such a delegate is able to handle the
actual
line tree/branches
Any thoughts?
Thanks!
-Jim
--- On Fri, 4/1/11, Phil Thompson wrote:
From: Phil Thompson
Subject: Re: [PyQt] QTreeWidget/View: reimplementing drawTre
I need to change/assign a unique color to the tree and branches of a
QTreeWidget.
It appears I need to reimplement the drawTree() function. While I've
implemented
a treeview delegate before, this is unique enough (at least to me) to have me a
but stumped on syntax. I've searched high and low f
Anybody have any experiences or insights they'd like to share
regarding QLineEdit and programming an auto-completion function?
Many Thanks,
-JP
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Thank you very much, ER!...that worked...
--- On Tue, 3/22/11, Entity Reborn wrote:
From: Entity Reborn
Subject: Re: [PyQt] Passing text from MainWindow to popup Dialog
To: "James Polk"
Cc: "pyqt@riverbankcomputing.com"
Date: Tuesday, March 22, 2011, 6:17 PM
S
I have a scenario where my MainWindow needs to call and display
a popup Window...and while the window is open, processing continues
in the main application, and during processing needs to send a string or
two of text to the popup dialog.
I know how to call and display the popup window/dialog,..an
ok...just to wrap this up, lol...
I've found that passing that odd instance memory address to the
appropriate function, it'll return the data I need...strikes me as odd,
but it works...
Cheers,
___
PyQt mailing listPyQt@riverbankcompu
...am having some success in doing a
>> from thisfile import *
whereas before I was just doing...
>> import thisfile
...the first method actually returns valid data when the functions are called...
but when I try to get/print some array/list values...I get
...which I doesn't convert to asci
Greetings All,
I have what appears to be an import phenomena that I can't seem to make work,
and was hoping someone here can help solve and explain...
The snippet below is output from Maya2011 as what's called a "precomp" script,
but it is from top to bottom a Python script. It is output from M
...lol,...seems like every time I send an email to you guys,
about 5 minutes later, I find the answer,...lol
What's working for me...
row = self.ScenesListView.currentRow()
item = self.ScenesListView.item(row)
if item is not None:
print unicode(item.text())
Dankashein
_
Somebody please put me out of my misery!...
Just a simple little QListWidget...
temp1 = self.ScenesListView.currentItem()
print temp1
returns
and
print temp1.text()
returns
AttributeError: 'NoneType' object has no attribute 'text'
sheesh...is it me?...or is
hey guys,
I've read all the documentation and for the life of me, I can't find the
solution to initiate simple file filtering (by extension) in QFileSystemModel,
and/or using QDirModel / QDir...
I just want a Treeview of files and directory, but excluding certain files by
their extensions
Doh!please ignore that last emailI found the problem...and it is me!
For those who are using Maya and PyQt, may I offer this
hard-earned pearl of wisdom?(who knows maybe somebody
else will have the answer, lol)
Unlike MEL,...where you can re-source the code and re-run the
code to ge
Having a real problem figuring this one out, am hoping you guys
can shed some light on this...
In my treeview, I have decoration turned off, so it looks like a
table or spreadsheet,...I have a delegate (that's been working fine)
that handles the display of items in the treeview, right...
Across
That did it!...
Adding a "dataChanged" connection (and re-implementing
the function to the underlying model made the controls update..
Thanks a million Andreas!
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputin
Okay,..I gotta' good one for ya'll...lol
I have a TreeView displaying data,..it's supported by a
QStyleItemDelegate that's controlling the editing/display of various cells
in the TreeView. There is a plainTextEdit window also in the main
window. When a user makes a selection in the TreeView,
th
t;CategoryField" , self.CategoryComboBox,
"currentText" )
and that did the trick! ;-)
(..now I wonder if I need to include that extra argument if I do a
"setField" later ? )
--- On Fri, 1/7/11, James Polk wrote:
From: James Polk
Subject: Wizards and fields
To: pyqt@riverb
I have a curiously frustrating problem concerning using fields
in Wizards,...Their definition seems straightforward enough,
and I had been using them in conjunction with isComplete functions,etc..
However,..here's my problem...
I've created a new field based on the current setting of a ComboBox.
Thanks Mike!, for taking time to respond...
You've outlined several new ways that I had not seen,
and had not occurred to me,...I want to read and go thru
your examples in more detail and try them out,
but just wanted to say "Thanks!" for sharing your
knowledge and experience,..
-James
well, being the hacker I am ;-) I found a convenient, but perhaps not elegant
solution...
I simply cat'd the "stripped main" file >> the ui_AAA.py file,
so that all graphical elements get the same namespace...
Still, I get the sense I'm not following good form, and would still like
to hear from
Good Day to All,
I'd like to engage the heavy weight gurus out there,
but anyone is welcome to respond,..
(Apologies for the long-winded email, but difficult
to accurate explain)
Though not new to software development, I'm still a bit
of a green horn in PyQt, and in my usual habit of running
be
Doug suggested using QWizard for a multi-step process I have going,
and it's working quite well, Thanks Doug!
But, I'm having a small issue with tweeking the window size as I
go thru each step...Unfortunately, the window contents for "step 1"
are much less than they are for steps 2 and 3, so the
Hmmm,...I got an error when trying to run those examples
in AnimationFrameworkafter some digging, it looks like that's
due to QGraphicsObject being introduced in 4.6, and I'm in 4.5.3.
I have to use that version in order to be compatible with Maya 2011.
Will check out the Wizard class,...wasn
Happy New Year to All!,...
About to start searching PyQt docs,...thought I'd ask here too...
I have to create a sorta' 1-2-3 menu process for users...
Thought about doing something fancy, like rotating entire layouts
in and out of main window...or maybe animating (probably translation)
them, etc
...well I've found a workaround, lol...found a "stylesheet"
area of attributes in Designer,...so I can continue forward,..
I'd be interested to hear or know anything about the zorder thing,...
Seems like that might come up again down the road,..
Cheers,
-James
_
Happy Holidays All,
In Designer, top menuBar, Edit->Send to Back...
Works as expected in Designer, but when I use "ui2py" to convert
into regular PyQt, it seems that this gets lost in translation.
Examining the ".ui" file, I see an XML attribute named "zorder",
but in the post-conversion ".py" f
...Whoops,...please disregard my question...
I found the problem,...was a stupid typo on my part ;-)
"We now rejoin your regularly scheduled program in progress"
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankco
Greetings All,..
I used PyQt's Designer to create a ".ui" file...
In this file, I created a simple QLabel, but I wanted/needed to
change the font, size, and color.
In Maya, there is a custom command (loadUI) that will automatically
interpret and display the UI correctly.
Separately, I used "pyu
Thanks Eric!...I think I found what you're referring to...
http://doc.qt.nokia.com/4.5/qimage.html
...looks like scaletoWidth() etc should work!
Thanks!!
--- On Sat, 12/4/10, James Polk wrote:
From: James Polk
Subject: image utilities in Qt
To: pyqt@riverbankcomputing.com
Date: Sat
I've found hints that Qt supports some image handling basics..
Is there any kind of functionality for image conversion?
And/or basic image resizing, cropping,etc? Something along
the lines of the ImageMagick suite of programs?
All I'm looking to do (at least in the short term) is generate small
t
Schawt!the "Date" sort works vey nice now!
Thanks Pete!...awesome work!
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
...very interesting,...
Thank you for taking time to explain that, Pete!
Greatly appreciated!
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
I read the Wikipedia page that explains what SIP is and does,
though I can't say I understood everything it explained ;-)
I'm getting a SIP usage error and I was hoping someone here
could help me understand the phenomena...
In my program (which borrows heavily from the BasicSortFilter
example)
Since it took me such a long while to get just the proper versions
of Python/Qt/PyQt installed (to sync with Maya 2011), I thought it
might be wise to ask beforehand,...
Apparently I need to install PyOpenGL,would doing so conflict
with, or disable, or modify,etcmy existing installation
Hi All,
Before asking this question, I did side-by-side testing and confirmation
of the sorting results in both the "Basic" and "Custom" examples...
Even compared the C++ vs Python generated code, same results...
I also checked this on Pete's newly posted custom example..
The observation is this.
'nuther wh!...I got a button!, lol...
A button in the first column of a TreeView on startup..
Unfortunately, it's not a PushButton, so it's not "pushing", lol...
but surely that's something I'm overlookingbut apparently
QStyleOption has no "PushButton",but maybe I need to
pass an
>Just remember, that small self contained examples of such issues are the
>ultimate weapon to engage them...
>Pete
lol, totally,...I went back to Mark Summerfield's book again (and other
examples)...
I'm soo close...but still a step or two go...
Finally figured out how to use my delegate's
When I run QtDesigner (the one that lives in ../PyQt4/bin/)...
When I run "Help" from the menuBar, all of the examples (as far as I can tell)
are in C++...
Is there a version of this help in Python?
Cheers,
-Jim
___
PyQt mailing listPyQt
WhoI got a custom delegate installedat least partially, lol...
Using the basic QItemDelegate
I've first tried a comboBox, which seems a little more straightforward,..
When using QTableView,...the "index.column()" calls want text matching
the column headings,...but in QTreeView, th
>I've transcoded the stardelegate example a few weeks ago, which uses a
>custom widget in a QTableView, but due to the model/view/delegate
>pattern, that should be easy to map onto your problem.
>
>Pete
Thanks for your reply, Pete...
I reread chap's 14,15, and 16 from Mark Summerfield's book o
Hans, I'm sure you're right, but I'm still a little dense about this, lol...
All the examples of spinDelegates that I've seen are using integers,
and are present in every cell...usually in QTableView...
I'm using QTreeView, and I only want a pushButton/Icon in the first
column,...I've spent abou
Hi,..I'm trying to save the contents of a QSortFilterProxyModel
(self.proxyModel) as a pickle format file.
The code below appears to work, but unfortunately, there's
nothing in the filezero size file..
def saveAsPickle(self):
fname = "C:/tmp/pick.dat"
file = open(unicode(fname), "w
...well in a burst of inspiration, or was that the caffeine,...I hit upon
something that worksessentially bypassing the middleman, so to
speak...instead of calling addMail(),...I just do what addMail does/
did before...
So, now,..my code snippet looks like this
def addNewRecord(self):
p
test
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Good Day to All,
Been writing code for years, but still a bit green when it comes to PyQt,
so please forgive my syntactically lacking question(s) ;-)
I'm hacking a derivative of the (famous?) packaged example that
comes with PyQt4 (and Qt), namely "basicsortfiltermodel.pyw"
from "../examples/item
Hello,
I'm trying to figure out how embed a pushButton (with iconic image
preferrably) in the first column of a TableView (or TreeView in
QSortFilterProxyModel). This is something that is pretty easy to do
in MEL (Maya's command language) but apparently seems pretty
tricky to do in PyQt. I've s
70 matches
Mail list logo