[PyQt] stylesheet sub-controlls

2010-03-24 Thread Lennart Jansen
Hi,

are there stylesheet sub-controlls in pyqt like in qt? For example the widget 
Qprogressbar in qt got the sub-controll chunk, but i cant find anything like it 
in pyqt.

I wish all of you a good day!
-- 
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] pythonw crash trying to run demos

2010-03-24 Thread Christoph Burgmer
Even if it seems to be a working example from the book, you might want to 
provide the source code for us. Make sure we can try to reproduce the problem.

Can you run at least another example program to show your installation is 
working?

Please also try to use text emails, not html.
Best,
-Christoph

Am Dienstag, 23. März 2010 schrieb Colin Jenkins:
 Hi,
 
  I have tried to google my problem but no luck - can not find archive of
  this list to check either. 
 
  Apologies for basic Q.
 
  Bought the Summerfield rapid GUI book and Python 3.1 books.
 
  Using windows xp sp3.
 
  Just installed python 3.1.2 (windows .msi) + pyqt-py3.1-gpl4.7.2-1
  (windows .exe).
 
  Started the examples and demo = crash in pythonw.
 
  The IDLE shell works OK.
 
  Windows restart not helped.
 
  Any ideas? 
 
  Ditto with python 2.6.5 and the corresponding pyqt binary.
 

___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] QXmlQuery.evaluate() does'nt accept QString parameter?

2010-03-24 Thread Olivier Fournier

Phil Thompson a écrit :

On Tue, 23 Mar 2010 16:34:39 +0100, Olivier Fournier
o.fourn...@perigord.com wrote:
  

Hi,

I would like to use the overloaded function  QXmlQuery.evaluateTo (self, 
QString).

I raise this Error:
TypeError: arguments did not match any overloaded call:
  QXmlQuery.evaluateTo(QXmlResultItems): argument 1 has unexpected type 
'str'
  QXmlQuery.evaluateTo(QAbstractXmlReceiver): argument 1 has unexpected 
type 'str'

  QXmlQuery.evaluateTo(QIODevice): argument 1 has unexpected type 'str'

python version: 3.1.1 (r311:74483, Aug 17 2009, 17:02:12) [MSC v.1500 32 
bit (Intel)]

pyqt version : 4.6.1

I don't understand why.



Mainly laziness on my part. I need to write some handwritten code to deal
with immutable strings. I'll add...

QXmlQuery.evaluateToString() - str

...to tonight's snapshot. None will be returned if the evaluation fails.

Phil

  


It's OK for evaluateToString(), thank you.

but evaluateToStringList() returns None, Is it normal?

Oliv


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] Run a job in background

2010-03-24 Thread dalvarez


Hello everybody, 

I'm starting with the PyQt programming so my knowledge on this is not very
broad at the moment, then I'm asking for some help if possible :) Well,
here my problem: 

I'm programming a GUI to collect some variables for afterwards running a
long and time consuming process (like 2h maybe). The main window is done
and the job is ready to be launched. I have a button connected to a
function that calls an external program with the variables gathered. 

What I'd like to do is: when I click this button, it opens a new small
window that can control the process (stoping it if necessary, tracking the
process with a progress bar and receive piped errors). 

But what I actually have is that when I click this button it launhes the
process blocking the main window losing all control. I have to kill the job
and the window if I want to stop it. 

So, my questions would be: 

- How can I open that small window to receive and track the process? 

- How to connect the function (at
the moment outside the main class) to
the progress bar and to that small window? 

- How to launch the external program in background mode without blocking
all the windows? 

I'd really appreciate some help on this! I'm quite lost and the
documentation is really confusing... 

Thank you very much in advance! 

Daniel 

 ___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] How to retrieve number of fields of a query from QSqlQuery object

2010-03-24 Thread bar tomas
Hi,
QSqlQuery's size method gives the number of rows retrieved with a
query. But is there some way to get the number of fields (columns) of
that query?
Many thanks.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] How to retrieve number of fields of a query from QSqlQuery object

2010-03-24 Thread Wolfgang Rohdewald
On Mittwoch 24 März 2010, bar tomas wrote:
 Hi,
 QSqlQuery's size method gives the number of rows retrieved
 with a query. But is there some way to get the number of
 fields (columns) of that query?
 Many thanks.

if self.query.isSelect():
  record = self.query.record()
  qFields = [record.field(x) for x in range(record.count())]

-- 
Wolfgang
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Run a job in background

2010-03-24 Thread Russell Valentine
On 03/24/10 08:18, dalvarez wrote:
 So, my questions would be: 
 
 - How can I open that small window to receive and track the process? 
 
 - How to connect the function (at
 the moment outside the main class) to
 the progress bar and to that small window? 
 
 - How to launch the external program in background mode without blocking
 all the windows? 


I'd make run a thread (QThread) and send the output of the process to
the small window and progress bar using signals and slots.
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] stylesheet sub-controlls

2010-03-24 Thread Nick Gaens
Hello Lennart,

By subcontrols, do you mean something like:

qpushbutton { color: white; }

qpushbutton:pressed { color: black; }

?

If so, you can set the same stylesheet to a widget as in the regular Qt,
it has little to do with PyQt itself, since the stylesheet is just a string
to be parsed.


On Wed, Mar 24, 2010 at 9:22 AM, Lennart Jansen lord@gmx.net wrote:

 Hi,

 are there stylesheet sub-controlls in pyqt like in qt? For example the
 widget Qprogressbar in qt got the sub-controll chunk, but i cant find
 anything like it in pyqt.

 I wish all of you a good day!
 --
 Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
 jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser
 ___
 PyQt mailing listPyQt@riverbankcomputing.com
 http://www.riverbankcomputing.com/mailman/listinfo/pyqt




-- 
Nick Gaens
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] stylesheet sub-controlls

2010-03-24 Thread Lennart Jansen

Hi,

thank for the response... i found the answer by myself by now XD



self.baraction.setStyleSheet(QProgressBar   
{background-color:   white;
  
text-align: center;
  
color:  black;
  border: 2px 
solid black;
  
border-radius: 6px;}


-  
QProgressBar::chunk{background-color:   green;
-   
border-radius: 3px;}

)

my problem was that i didnt get it that the string itself is kinda like 
in c++, i wrote the syntax like python code and since this didnt work i 
started thinking it wouldnt work at all




Am 25.03.2010 00:45, schrieb Nick Gaens:

Hello Lennart,

By subcontrols, do you mean something like:

qpushbutton { color: white; }

qpushbutton:pressed { color: black; }

?

If so, you can set the same stylesheet to a widget as in the regular 
Qt, it has little to do with PyQt itself, since the stylesheet is just 
a string to be parsed.



On Wed, Mar 24, 2010 at 9:22 AM, Lennart Jansen lord@gmx.net 
mailto:lord@gmx.net wrote:


Hi,

are there stylesheet sub-controlls in pyqt like in qt? For
example the widget Qprogressbar in qt got the sub-controll chunk,
but i cant find anything like it in pyqt.

I wish all of you a good day!
--
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser
___
PyQt mailing list PyQt@riverbankcomputing.com
mailto:PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt




--
Nick Gaens


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt