Re: [PyQt] Resizing of layout on runtime

2010-10-15 Thread mezgani ali
I had the same problem, but i think that the Qt creator do that
automatically, and reasonably in some ways.

Best Regards,

On Fri, Oct 15, 2010 at 8:34 PM, Andrew Matsusaka <
andrew.matsus...@primefocusworld.com> wrote:

> I've created a custom widget that contains quite a few QLabels and
> QTextEdits. I'm connecting to a MySQL database and retrieving a certain
> number of items that I want to display through these custom widgets by
> creating a widget for each item. I would like these items to be in a
> vertical layout but I'm having trouble resizing the layout to fit any number
> of these widgets.
>
> Basically, what I'm wondering is if there's a way to resize a QLayout (or
> any other type of container that would work) based on the widgets it
> contains.
>
> Thanks,
> Andrew Matsusaka
> ___
> PyQt mailing listPyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>



-- 
Ali MEZGANI
Network Engineering/Security
http://securfox.wordpress.com/
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] How to slim programs under windows

2009-05-28 Thread mezgani ali
On Thu, May 28, 2009 at 3:47 PM, Darryl Wallace  wrote:

> Hello,
>
>>
>> I build a exe program with py2exe, and it size is about 8M.
>> The program is very simple, it's a widget that contain  too lineedit and a
>> button, it's based on pyqt.
>> Please is there a way to resize the file for small one.
>>
> My experience has been that if it is a gui-based PyQt program, you need to
> package the python runtime (python2x.dll), the python PyQt libraries
> (Qt.pyd, QtCore.pyd, QtGui.pyd) and the Qt dll's (QtCore4.dll, QtGui4.dll).
>  You may also need to distribute the C-runtime library (mingwm10.dll or
> msvcrXX.dll) depending on how your application was setup.   All of these
> need to be included because you can't assume the end user will have them on
> their system.
>
Yes, that is.
However, the only way i found and it was a suggestion from the py2exe
mailing list,
is the use of  "options = { "py2exe": {"compressed": 2}}" in my setup.py.
That does not include the dll, PyQt libraries and python runtime in the
executable file, giving a chance to install there libraries separately.

>
> Even with your small widget developed in C++ you still need to distribute
> the Qt dll's since these are not standard windows libraries.
>
> My conclusion: it's not possible to make your apps have super small
> download size with Qt and PyQt.
>
> If anyone has other experiences with this please share them.
>
Thanks Darry for you reply.

>
> Darryl
>



-- 
Ali MEZGANI
Network Engineering/Security
http://securfox.wordpress.com/
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] How to slim programs under windows

2009-05-27 Thread mezgani ali
Hi,

I build a exe program with py2exe, and it size is about 8M.
The program is very simple, it's a widget that contain  too lineedit and a
button, it's based on pyqt.
Please is there a way to resize the file for small one.

Regards,

-- 
Ali MEZGANI
Network Engineering/Security
http://securfox.wordpress.com/
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] Re: QtCore.QObject.connect, AttributeError

2009-04-15 Thread mezgani ali
Resolved.
QtCore.QObject.connect(self.wButton,QtCore.SIGNAL("clicked()"),self.onClick)


On Wed, Apr 15, 2009 at 12:09 PM, mezgani ali  wrote:

> Hi,
>
> I'm working on a python application, and i use Qt user interface.
> Well when i try to run my script i got this error:
>
> Traceback (most recent call last):
>   File "app.py", line 545, in 
> ui.setupUi(window)
>   File "app.py", line 490, in setupUi
>
> QtCore.QObject.connect(self.wButton,QtCore.SIGNAL("clicked()"),self.output.onClick)
> AttributeError: onClick
>
> And i have the function noClick already defined in my app.py file.
> Can you help me to identify the problem ?
> Thanks in advance
>
> --
> Ali MEZGANI
> Network Engineering/Security
> http://securfox.wordpress.com/
>



-- 
Ali MEZGANI
Network Engineering/Security
http://securfox.wordpress.com/
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] QtCore.QObject.connect, AttributeError

2009-04-15 Thread mezgani ali
Hi,

I'm working on a python application, and i use Qt user interface.
Well when i try to run my script i got this error:

Traceback (most recent call last):
  File "app.py", line 545, in 
ui.setupUi(window)
  File "app.py", line 490, in setupUi

QtCore.QObject.connect(self.wButton,QtCore.SIGNAL("clicked()"),self.output.onClick)
AttributeError: onClick

And i have the function noClick already defined in my app.py file.
Can you help me to identify the problem ?
Thanks in advance

-- 
Ali MEZGANI
Network Engineering/Security
http://securfox.wordpress.com/
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt