Re: [PyQt] Building PyQt to work with Qt5

2013-04-23 Thread Phil Thompson
On Mon, 22 Apr 2013 18:53:35 -0400, James Jong 
wrote:
> When building/installing PyQt (from source or using pip), how do I
specify
> the path to the local Qt5 installation?
> 
> I built Qt5 from source
>
(qt-everywhere-opensource-src-5.0.2.tar.gz)
> with the following command:
> 
> wget
>
http://download.qt-project.org/official_releases/qt/5.0/5.0.2/single/qt-everywhere-opensource-src-5.0.2.tar.gz
> tar -xvf qt-everywhere-opensource-src-5.0.2.tar.gz
> 
> cd qt-everywhere-opensource-src-5.0.2./configure -prefix $PWD/qtbase
> -opensource -nomake tests
> make -j 4
> 
>  If I then cd into qtbase I see:
> 
> bin/
> dist/
> doc/
> examples/
> imports/
> include/
> lib/
> etc ...
> 
> Looking at the PyQt4 installation
> instructions
> I
> could not find a flag or an option to specify the location of the Qt
> installation.
> 
> Is there a way to tell PyQt4 where to find Qt5?
> Note: I left a copy of this thread on StackOverflow:
>
http://stackoverflow.com/questions/16154402/building-pyqt-to-work-with-qt5
> 
> Thanks,
> 
> Josh

Use the --qmake argument to configure.py or configure-ng.py.

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


[PyQt] Trying to create SIP

2013-04-23 Thread Tomas Neverdauskas
Hi,

i'am trying to create python interface to QtAV project
https://github.com/wang-bin/QtAV (AvPlayer.h). Currently wrote this sip
file, but after executing got this "sip: syntax error" and no other hint is
provided.

Please help to parse this file, thank you.

%Module AVPlayer

%Import QtCore/QtCoremod.sip
%Import QtGui/QtGuimod.sip

namespace QtAV {

%TypeHeaderCode
#include <../src/QtAV/AVClock.h>
#include <../src/QtAV/AVDemuxer.h>
%End

class AudioOutput;
class AudioThread;
class VideoThread;
class AudioDecoder;
class VideoDecoder;
class VideoRenderer;
class AVClock;
class AVDemuxThread;
class VideoCapture;
class OSDFilter;
class AVPlayer : QObject
{
public:
explicit AVPlayer(QObject *parent = 0);
~AVPlayer();

//NOT const. This is the only way to access the clock.
AVClock* masterClock();
void setFile(const QString& path);
 QString file() const;
bool load(const QString& path);
bool load();
bool isLoaded() const;
qreal duration() const; //This function may be removed in the future.
/*
 * default: [fmt: PNG, dir: capture, name: basename]
 * replace the existing capture; return the replaced one
 * set 0 will disable the capture
 */
VideoCapture* setVideoCapture(VideoCapture* cap);
VideoCapture *videoCapture();
void setCaptureName(const QString& name);//TODO: remove. base name
void setCaptureSaveDir(const QString& dir); //TODO: remove
bool captureVideo();
OSDFilter* setOSDFilter(OSDFilter* osd);
OSDFilter* osdFilter();
bool play(const QString& path);
 bool isPlaying() const;
bool isPaused() const;
//this will install the default EventFilter. To use customized filter,
register after this
VideoRenderer* setRenderer(VideoRenderer* renderer);
VideoRenderer* renderer();
AudioOutput* audio();
void setMute(bool mute);
bool isMute() const;
/*only 1 event filter is available. the previous one will be removed.
setPlayerEventFilter(0) will remove the event filter*/
void setPlayerEventFilter(QObject *obj);

signals:
void started();
void stopped();

public slots:
void pause(bool p);
void play(); //replay
void stop();
void playNextFrame();
void seek(qreal pos);
void seekForward();
void seekBackward();
void updateClock(qint64 msecs); //update AVClock's external clock

protected slots:
void resizeRenderer(const QSize& size);

public: //original was protected, but SIP complained that classes must be
public
bool loaded;
AVFormatContext *formatCtx; //changed when reading a packet
AVCodecContext *aCodecCtx; //set once and not change
AVCodecContext *vCodecCtx; //set once and not change
QString path;
QString capture_name;
QString capture_dir;

//the following things are required and must be setted not null
AVDemuxer demuxer;
AVDemuxThread *demuxer_thread;
AVClock *clock;
VideoRenderer *_renderer; //list?
AudioOutput *_audio;
AudioDecoder *audio_dec;
VideoDecoder *video_dec;
AudioThread *audio_thread;
VideoThread *video_thread;

//tODO: (un)register api
QObject *event_filter;
VideoCapture *video_capture;
OSDFilter *osd;
};

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

Re: [PyQt] Trying to create SIP

2013-04-23 Thread Phil Thompson
On Tue, 23 Apr 2013 10:58:27 +0300, Tomas Neverdauskas 
wrote:
> Hi,
> 
> i'am trying to create python interface to QtAV project
> https://github.com/wang-bin/QtAV (AvPlayer.h). Currently wrote this sip
> file, but after executing got this "sip: syntax error" and no other hint
is
> provided.
> 
> Please help to parse this file, thank you.
> 
> %Module AVPlayer
> 
> %Import QtCore/QtCoremod.sip
> %Import QtGui/QtGuimod.sip
> 
> namespace QtAV {
> 
> %TypeHeaderCode
> #include <../src/QtAV/AVClock.h>
> #include <../src/QtAV/AVDemuxer.h>
> %End
> 
> class AudioOutput;
> class AudioThread;
> class VideoThread;
> class AudioDecoder;
> class VideoDecoder;
> class VideoRenderer;
> class AVClock;
> class AVDemuxThread;
> class VideoCapture;
> class OSDFilter;
> class AVPlayer : QObject
> {
> public:
> explicit AVPlayer(QObject *parent = 0);
> ~AVPlayer();
> 
> //NOT const. This is the only way to access the clock.
> AVClock* masterClock();
> void setFile(const QString& path);
>  QString file() const;
> bool load(const QString& path);
> bool load();
> bool isLoaded() const;
> qreal duration() const; //This function may be removed in the
future.
> /*
>  * default: [fmt: PNG, dir: capture, name: basename]
>  * replace the existing capture; return the replaced one
>  * set 0 will disable the capture
>  */
> VideoCapture* setVideoCapture(VideoCapture* cap);
> VideoCapture *videoCapture();
> void setCaptureName(const QString& name);//TODO: remove. base name
> void setCaptureSaveDir(const QString& dir); //TODO: remove
> bool captureVideo();
> OSDFilter* setOSDFilter(OSDFilter* osd);
> OSDFilter* osdFilter();
> bool play(const QString& path);
>  bool isPlaying() const;
> bool isPaused() const;
> //this will install the default EventFilter. To use customized
filter,
> register after this
> VideoRenderer* setRenderer(VideoRenderer* renderer);
> VideoRenderer* renderer();
> AudioOutput* audio();
> void setMute(bool mute);
> bool isMute() const;
> /*only 1 event filter is available. the previous one will be
removed.
> setPlayerEventFilter(0) will remove the event filter*/
> void setPlayerEventFilter(QObject *obj);
> 
> signals:
> void started();
> void stopped();
> 
> public slots:
> void pause(bool p);
> void play(); //replay
> void stop();
> void playNextFrame();
> void seek(qreal pos);
> void seekForward();
> void seekBackward();
> void updateClock(qint64 msecs); //update AVClock's external clock
> 
> protected slots:
> void resizeRenderer(const QSize& size);
> 
> public: //original was protected, but SIP complained that classes must
be
> public
> bool loaded;
> AVFormatContext *formatCtx; //changed when reading a packet
> AVCodecContext *aCodecCtx; //set once and not change
> AVCodecContext *vCodecCtx; //set once and not change
> QString path;
> QString capture_name;
> QString capture_dir;
> 
> //the following things are required and must be setted not null
> AVDemuxer demuxer;
> AVDemuxThread *demuxer_thread;
> AVClock *clock;
> VideoRenderer *_renderer; //list?
> AudioOutput *_audio;
> AudioDecoder *audio_dec;
> VideoDecoder *video_dec;
> AudioThread *audio_thread;
> VideoThread *video_thread;
> 
> //tODO: (un)register api
> QObject *event_filter;
> VideoCapture *video_capture;
> OSDFilter *osd;
> };
> 
> } //namespace QtAV

Maybe a semi-colon after the last closing brace. The general approach is
to comment things out until it parses to isolate the line causing the
problem.

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


[PyQt] moveToThread() does not cope with functools.partial

2013-04-23 Thread Giuseppe Corbelli
Please see the minimal test code below. In short connecting a signal to a 
functools.partial slot breaks the expected moveToThread behaviour.
Reasonable, I'd say, once you think about it. I'm just asking some suggestion 
about how this issue can be addressed. I thought about reimplementing some 
signal class with a connect_partial method that stores bound args.

Python 2.7.3, Qt 4.8.2, PyQt 4.10 on Linux.


#!/usr/bin/python
# -*- coding: utf-8 -*-

import sys
import functools

from PyQt4 import QtCore

class CApp(QtCore.QCoreApplication):
mysignal = QtCore.pyqtSignal()

class CA(QtCore.QObject):
def standard_slot(self):
print "standard_slot", QtCore.QThread.currentThreadId()

def partial_slot(self, param):
print "partial_slot", param, QtCore.QThread.currentThreadId()

app = CApp(sys.argv)
print "CApp", QtCore.QThread.currentThreadId()

thread = QtCore.QThread()

a = CA()
a.moveToThread(thread)
thread.start()
while not thread.isRunning():
pass

app.mysignal.connect(a.standard_slot, QtCore.Qt.QueuedConnection)
app.mysignal.connect(functools.partial(a.partial_slot, "aParam"), 
QtCore.Qt.QueuedConnection)


timer = QtCore.QTimer()
timer.setInterval(1000)
timer.timeout.connect(app.mysignal.emit)
timer.start()

app.exec_()


--
Giuseppe Corbelli
WASP Software Engineer, Copan Italia S.p.A
Phone: +390303666318  Fax: +390302659932
E-mail: giuseppe.corbe...@copanitalia.com
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] QsciScintilla with multiple documents

2013-04-23 Thread Phil Thompson
On Tue, 23 Apr 2013 05:02:25 +0430, Lee Harr  wrote:
> With the QTextEdit there is a separate QTextDocument that can
> be swapped in and out to make a multi-document editor.
> 
> I am trying to switch over to QsciScintilla but am having trouble
> achieving the same effect.
> 
> Does the QsciDocument serve the same purpose as QTextDocument?
> The online documentation for QsciDocument is very sparse. It says
> it is for having multiple QsciScintilla viewing the same document
> which is sort of the opposite of what I want.
> 
> Should I just be creating multiple QsciScintilla to make the multiple
> document system? Or am I missing something more like QTextDocument?

Just use setText().

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


Re: [PyQt] PyQt v4.10.1 install Error on Mac OS X

2013-04-23 Thread Phil Thompson
On Tue, 23 Apr 2013 03:50:04 +,  wrote:
> installed and verified working:
>  - Mac OS X Version 10.7.5 (Lion)
>  - Xcode Version 4.6.1
>  - Python 3.3.1 (python-3.3.1-macosx10.6.dmg)
>  - Qt5.0.2 (qt-mac-opensource-5.0.2-clang-offline.dmg)
>  - SIP v4.14.6 (sip-4.14.6.tar.gz)
>  - PyQt v4.10 (PyQt-mac-gpl-4.10.tar.gz) 
> 
> This is more of an FYI since I successfully installed v4.10 using
> configure.py and everything is working (after trying the brand new
> v4.10.1)!
> 
> With /Users/jar/Qt5.0.2/5.0.2/clang_64/bin in my PATH I issue the
> command: 
> 
> python3 configure-ng.py --sip
> /Library/Frameworks/Python.framework/Versions/3.3/bin/sip
> 
> after accepting the license terms, and after checking to see if several
> modules should be built... it errors out on the module QtDBus:
> 
> Checking to see if the QtDBus module should be built...
> Error: /Users/jar/Qt5.0.2/5.0.2/clang_64/bin/qmake failed to create a
> makefile
> from cfgtest_QtDBus.pro.
> 
> I wonder is this a missing Qt5 environment variable or path thing?

It's because qmake for Qt5 is less tolerant about creating makefiles for
unsupported modules. It will be fixed in tonight's snapshot.

> An
> interesting note is that w/ v4.10 (configure.py) I do not need to
specify
> the location of the SIP on the command line however v4.10.1
> (configure-ng.py) complains right away if I don't. 

The SIP location is supplied to configure.py by the sipconfig module. This
isn't used by configure-ng.py and so must be specified explicitly.

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

Re: [PyQt] QsciScintilla with multiple documents

2013-04-23 Thread Lee Harr
> > With the QTextEdit there is a separate QTextDocument that can
> > be swapped in and out to make a multi-document editor.
> >
> > I am trying to switch over to QsciScintilla but am having trouble
> > achieving the same effect.
> >
> > Does the QsciDocument serve the same purpose as QTextDocument?
> > The online documentation for QsciDocument is very sparse. It says
> > it is for having multiple QsciScintilla viewing the same document
> > which is sort of the opposite of what I want.
> >
> > Should I just be creating multiple QsciScintilla to make the multiple
> > document system? Or am I missing something more like QTextDocument?
>
> Just use setText().


But what about the undo information?

With QTextDocument, each document has its own undo
stack (which is what you want for a multi-document editor)
but when I setText() on the QsciScintilla the undo information
is lost.

Is there a way to save the undo stack? The only undo-related
methods I see are undo() and begin- and end- UndoAction()   
  
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] PyQt v4.10.1 install Error on Mac OS X

2013-04-23 Thread Phil Thompson
On Mon, 22 Apr 2013 22:26:52 -0600, "Melton Low (devl)"
 wrote:
> +1 Got the same error when using configure-ng.py.  Worked fine with old 
> configure.py.
> 
> I initially got the following error if I don't specify the location of 
> the sip binary located within the python3.3 framework bin folder. The 
> location is in my $PATH.  Here is the output:
> 
> bigbook:PyQt-mac-gpl-snapshot-4.10.2-e93e243169f6 melton$ python3.3 
> configure-ng.py --confirm-license
> Querying qmake about your Qt installation...
> Determining the details of your Qt installation...
> This is the GPL version of PyQt snapshot-4.10.2-e93e243169f6 (licensed
> under
> the GNU General Public License) for Python 3.3.1 on darwin.
> Found the license file pyqt-gpl.sip.
> /bin/sh: ./sip: is a directory
> Error: './sip -V' did not generate any output.
> bigbook:PyQt-mac-gpl-snapshot-4.10.2-e93e243169f6 melton$
> 
> Hope this helps.
> 
> My configuration is:
> 
> OS X 10.8.3
> Xcode 4.6.2
> Qt 5.0.2
> Sip 4.14.6
> PyQt 4.10.2 snapshot e93e243169f6
> 
> Mel

That looks like you have '.' in your PATH - that is a really bad idea.

I'll change the test for sip to ignore directories.

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


Re: [PyQt] QsciScintilla with multiple documents

2013-04-23 Thread Phil Thompson
On Tue, 23 Apr 2013 14:53:13 +0430, Lee Harr  wrote:
>> > With the QTextEdit there is a separate QTextDocument that can
>> > be swapped in and out to make a multi-document editor.
>> >
>> > I am trying to switch over to QsciScintilla but am having trouble
>> > achieving the same effect.
>> >
>> > Does the QsciDocument serve the same purpose as QTextDocument?
>> > The online documentation for QsciDocument is very sparse. It says
>> > it is for having multiple QsciScintilla viewing the same document
>> > which is sort of the opposite of what I want.
>> >
>> > Should I just be creating multiple QsciScintilla to make the multiple
>> > document system? Or am I missing something more like QTextDocument?
>>
>> Just use setText().
> 
> 
> But what about the undo information?
> 
> With QTextDocument, each document has its own undo
> stack (which is what you want for a multi-document editor)
> but when I setText() on the QsciScintilla the undo information
> is lost.
> 
> Is there a way to save the undo stack? The only undo-related
> methods I see are undo() and begin- and end- UndoAction() 
>   

No, the underlying Scintilla code doesn't support it.

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


Re: [PyQt] Trying to create SIP

2013-04-23 Thread Tomas Neverdauskas
Still no luck, now SIP complains:
*QtAV::AudioOutput is undefined*


2013/4/23 Phil Thompson 

> On Tue, 23 Apr 2013 12:03:35 +0300, Tomas Neverdauskas 
> wrote:
> > Yes that's was the case.
> >
> > Another problem, i think more complicated - sip says: "AudioOutput is
> > undefined", i should include the AudioOutput.sip (rework from same h)
> file,
> > definition like *class AudioOutput;* is not enought?
>
> SIP isn't very clever at parsing namespaces. You need to include the
> namespace name...
>
> QtAV::AudioOutput *audio()
>
> Phil
>
>


-- 
Tomas Neverdauskas
Tel.: +370 611 51829
skype: tomasnev.
Kaunas, Lithuania
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Trying to create SIP

2013-04-23 Thread Phil Thompson
On Tue, 23 Apr 2013 15:21:14 +0300, Tomas Neverdauskas 
wrote:
> Still no luck, now SIP complains:
> *QtAV::AudioOutput is undefined*

The easiest approach is to build up the .sip file a bit at a time, rather
than trying to write the whole thing at once.

Phil

> 2013/4/23 Phil Thompson 
> 
>> On Tue, 23 Apr 2013 12:03:35 +0300, Tomas Neverdauskas
>> 
>> wrote:
>> > Yes that's was the case.
>> >
>> > Another problem, i think more complicated - sip says: "AudioOutput is
>> > undefined", i should include the AudioOutput.sip (rework from same h)
>> file,
>> > definition like *class AudioOutput;* is not enought?
>>
>> SIP isn't very clever at parsing namespaces. You need to include the
>> namespace name...
>>
>> QtAV::AudioOutput *audio()
>>
>> Phil
>>
>>
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] moveToThread() does not cope with functools.partial

2013-04-23 Thread Phil Thompson
On Tue, 23 Apr 2013 10:08:23 +0200, Giuseppe Corbelli
 wrote:
> Please see the minimal test code below. In short connecting a signal to
a 
> functools.partial slot breaks the expected moveToThread behaviour.
> Reasonable, I'd say, once you think about it. I'm just asking some
> suggestion 
> about how this issue can be addressed. I thought about reimplementing
some 
> signal class with a connect_partial method that stores bound args.
> Python 2.7.3, Qt 4.8.2, PyQt 4.10 on Linux.

Should be fixed in tonight's PyQt4 snapshot.

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


Re: [PyQt] moveToThread() does not cope with functools.partial

2013-04-23 Thread Giuseppe Corbelli

On 23/04/2013 14:57, Phil Thompson wrote:

Please see the minimal test code below. In short connecting a signal to

a

functools.partial slot breaks the expected moveToThread behaviour.
Reasonable, I'd say, once you think about it. I'm just asking some
suggestion
about how this issue can be addressed. I thought about reimplementing

some

signal class with a connect_partial method that stores bound args.
Python 2.7.3, Qt 4.8.2, PyQt 4.10 on Linux.


Should be fixed in tonight's PyQt4 snapshot.


I'm curious to understand how you fixed it. Can I ask for a diff or some other 
pointer to look at?


--
Giuseppe Corbelli
WASP Software Engineer, Copan Italia S.p.A
Phone: +390303666318  Fax: +390302659932
E-mail: giuseppe.corbe...@copanitalia.com
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] moveToThread() does not cope with functools.partial

2013-04-23 Thread Phil Thompson
On Tue, 23 Apr 2013 15:27:17 +0200, Giuseppe Corbelli
 wrote:
> On 23/04/2013 14:57, Phil Thompson wrote:
>>> Please see the minimal test code below. In short connecting a signal
to
>> a
>>> functools.partial slot breaks the expected moveToThread behaviour.
>>> Reasonable, I'd say, once you think about it. I'm just asking some
>>> suggestion
>>> about how this issue can be addressed. I thought about reimplementing
>> some
>>> signal class with a connect_partial method that stores bound args.
>>> Python 2.7.3, Qt 4.8.2, PyQt 4.10 on Linux.
>>
>> Should be fixed in tonight's PyQt4 snapshot.
> 
> I'm curious to understand how you fixed it. Can I ask for a diff or some
> other 
> pointer to look at?

Look at get_receiver() in qpy/QtCore/qpycore_pyqtboundsignal.cpp. It just
strips off the functools.partial wrappers until it gets to the QObject. The
proxy that is created is then moved to the same thread as the QObject.

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


Re: [PyQt] ANN: PyQt v4.10.1 Released

2013-04-23 Thread Detlev Offenbach
Hello Phil,

please disregard the first part of the message. Doing some more 
investigations showed, that Windwos tricked me. Sorry for the noise.

Meanwhile I found a new issue. Calling e.g. qhelpgenerator as delivered 
with the lates PyQt4 with Qt5 installer gives this error message:

Failed to load platform plugin "minimal". Available platforms are: windows.

In deed, the platforms plugin directory only contains qwindows.dll. How can 
I overcome this issue?

Yet another observation. Entering the following in a Python 3.3 shell gives 
a wrong output.

>>> from PyQt4.QtCore import QLibraryInfo
>>> QLibraryInfo.location(QLibraryInfo.BinariesPath)
'C:/Qt/5.0.2/bin'
>>>

I would have expected something like "C:\Python33\Lib\site-
packages\PyQt4", because that is where the executable reside when 
installed via the installer. How can I overcome this issue?


Regards,
Detlev

On Monday 22 April 2013, 21:39:58 Phil Thompson wrote:
> On Mon, 22 Apr 2013 20:34:42 +0200, Detlev Offenbach
> 
>  wrote:
> > Hello,
> > 
> > I am observing a strange behavior when using the PyQt4, Python 3.3, 
Qt5
> > installer when starting eric5. There appears a dialog saying something
> > like
> > 'There is no medium in drive D:'. This message appears twice. 
Selecting
> > Cancel keeps eric going. It does not appear when using the installer for
> > 
> > Qt4. What is going on here?
> 
> Absolutely no idea. 64 bit or 32 bit?
> 
> > Some installers seem to be missing the QScintilla.api file.
> > 
> > Regards,
> > Detlev
> 
> Phil
> ___
> PyQt mailing listPyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt-- 
*Detlev Offenbach*
det...@die-offenbachs.de
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[PyQt] how to install Pyqt4 on OS X ?

2013-04-23 Thread šãñ
I have downloaded the tar for mac osx ... I am totally new to OSx migrating
from Windows OS .. so pls guide...

-- 
**

[image: San's personal blog] 

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

Re: [PyQt] how to install Pyqt4 on OS X ?

2013-04-23 Thread James Ross
> I have downloaded the tar for mac osx ... I am totally new to OSx 
> migrating from Windows OS .. so pls guide... 

Since I just did this, here are the steps that worked for me ... 

Basically, I just accepted the *defaults* for each install

 - Install the latest Xcode from Apple Store... (a few weeks ago it was 4.6.1)  
 
 - Install the latest Python 3.3.1 Mac OS X 64-bit/32-bit x86-64/i386 Installer 
from Python.org 
 - Install the latest Qt 5.0.2 for Mac (binary install) from qt-project.org
 - Install latest SIP v4.14.6
 - Install PyQt4 v4.10 -- (read below) You can get it at 
http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.10/

The only two that need compiling are the SIP & PyQt4 

Unarchive sip-4.14.6.tar.gz into a temp folder and read the instructions in 
doc/html/installation.html
basically I did this:

$ python3 configure.py
$ make
$ install
 
Unarchive PyQt-mac-gpl-4.10.tar.gz into a temp folder and read the instructions 
in doc/html/installation.html
basically I did this:

I added the path to qmake to my path (but you could pass that on the command 
line)

PATH=$PATH\:/Users/jar/Qt5.0.2/5.0.2/clang_64/bin 
  
$ python3 configure.py
$ make
$ install

That should do it..  

Refer to the previous thread about 4.10.1, phil said he was going to fix it 
soon but 4.10 worked fine for me. 

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


Re: [PyQt] how to install Pyqt4 on OS X ?

2013-04-23 Thread James Ross
oops typo on the $ install --- should be $ make install

so for SIP & PyQt4 the general procedure is 

$ python3 configure.py
$ make
$ make install


> From: jrossl...@outlook.com
> To: pyqt@riverbankcomputing.com
> Date: Tue, 23 Apr 2013 19:22:00 +
> Subject: Re: [PyQt] how to install Pyqt4 on OS X ?
>
> > I have downloaded the tar for mac osx ... I am totally new to OSx
> > migrating from Windows OS .. so pls guide...
>
> Since I just did this, here are the steps that worked for me ...
>
> Basically, I just accepted the *defaults* for each install
>
> - Install the latest Xcode from Apple Store... (a few weeks ago it was 4.6.1)
> - Install the latest Python 3.3.1 Mac OS X 64-bit/32-bit x86-64/i386 
> Installer from Python.org
> - Install the latest Qt 5.0.2 for Mac (binary install) from qt-project.org
> - Install latest SIP v4.14.6
> - Install PyQt4 v4.10 -- (read below) You can get it at 
> http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.10/
>
> The only two that need compiling are the SIP & PyQt4
>
> Unarchive sip-4.14.6.tar.gz into a temp folder and read the instructions in 
> doc/html/installation.html
> basically I did this:
>
> $ python3 configure.py
> $ make
> $ install
>
> Unarchive PyQt-mac-gpl-4.10.tar.gz into a temp folder and read the 
> instructions in doc/html/installation.html
> basically I did this:
>
> I added the path to qmake to my path (but you could pass that on the command 
> line)
>
> PATH=$PATH\:/Users/jar/Qt5.0.2/5.0.2/clang_64/bin
>
> $ python3 configure.py
> $ make
> $ install
>
> That should do it..
>
> Refer to the previous thread about 4.10.1, phil said he was going to fix it 
> soon but 4.10 worked fine for me.
>
> James
> ___
> PyQt mailing list PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt   
>   
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] ANN: PyQt v4.10.1 Released

2013-04-23 Thread Phil Thompson
On Tue, 23 Apr 2013 19:53:58 +0200, Detlev Offenbach
 wrote:
> Hello Phil,
> 
> please disregard the first part of the message. Doing some more 
> investigations showed, that Windwos tricked me. Sorry for the noise.
> 
> Meanwhile I found a new issue. Calling e.g. qhelpgenerator as delivered 
> with the lates PyQt4 with Qt5 installer gives this error message:
> 
> Failed to load platform plugin "minimal". Available platforms are:
windows.
> 
> In deed, the platforms plugin directory only contains qwindows.dll. How
> can 
> I overcome this issue?

You'd have to copy it in from the Qt installer.

> Yet another observation. Entering the following in a Python 3.3 shell
> gives 
> a wrong output.
> 
 from PyQt4.QtCore import QLibraryInfo
 QLibraryInfo.location(QLibraryInfo.BinariesPath)
> 'C:/Qt/5.0.2/bin'

> 
> I would have expected something like "C:\Python33\Lib\site-
> packages\PyQt4", because that is where the executable reside when 
> installed via the installer. How can I overcome this issue?

Sounds like a problem with qt.conf. 32 bit or 64 bit installer?

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


Re: [PyQt] how to install Pyqt4 on OS X ?

2013-04-23 Thread James Ross
> > Refer to the previous thread about 4.10.1, phil said he was going to fix it 
> > soon but 4.10 worked fine for me.

ahh... Let me clear something up that I was a bit confused about.  

This also applies to the thread I started, "[PyQt] PyQt v4.10.1 install Error 
on Mac OS X" 

Actually PyQt4 v4.10.1 *does* successfully install on the mac if you use the 
'configure.py' (I just did it) and not the new 'configure-ng.py' (which is 
temporarily broke and will be fixed soon as per Phil's statement in previous 
thread!).  

After re-reading the doc's I see the following statements:

"configure.py is the original configuration script that uses the build system 
of SIP v4 (i.e. the sip.sipconfig module)."
"It will be supported for the life of PyQt4."
"configure-ng.py is ... is the basis of PyQt5’s configuration script"

So configure-ng.py is the current migration path towards a PyQt5! and your 
perfectly good to go ahead and use the current PyQt-mac-gpl-4.10.1.tar.gz but 
use the 'configure.py' script! 

I hope that clears it up! 

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


Re: [PyQt] how to install Pyqt4 on OS X ?

2013-04-23 Thread šãñ
i am using python 2.6 so probably Python2

and is this really required  - Install the latest Qt 5.0.2 for Mac (binary
install) from qt-project.org

if yes i would need Qt4

i am just going to use it to make apps in PyQt4 as of now...


On Wed, Apr 24, 2013 at 3:03 AM, James Ross  wrote:

> > > Refer to the previous thread about 4.10.1, phil said he was going to
> fix it soon but 4.10 worked fine for me.
>
> ahh... Let me clear something up that I was a bit confused about.
>
> This also applies to the thread I started, "[PyQt] PyQt v4.10.1 install
> Error on Mac OS X"
>
> Actually PyQt4 v4.10.1 *does* successfully install on the mac if you use
> the 'configure.py' (I just did it) and not the new 'configure-ng.py' (which
> is temporarily broke and will be fixed soon as per Phil's statement in
> previous thread!).
>
> After re-reading the doc's I see the following statements:
>
> "configure.py is the original configuration script that uses the build
> system of SIP v4 (i.e. the sip.sipconfig module)."
> "It will be supported for the life of PyQt4."
> "configure-ng.py is ... is the basis of PyQt5’s configuration script"
>
> So configure-ng.py is the current migration path towards a PyQt5! and your
> perfectly good to go ahead and use the current PyQt-mac-gpl-4.10.1.tar.gz
> but use the 'configure.py' script!
>
> I hope that clears it up!
>
> James
> ___
> PyQt mailing listPyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>



-- 
**

[image: San's personal blog] 

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

Re: [PyQt] how to install Pyqt4 on OS X ?

2013-04-23 Thread James Ross
> i am using python 2.6 so probably Python2 
> 
> and is this really required - Install the latest Qt 5.0.2 for Mac 
> (binary install) from qt-project.org 
> 
> if yes i would need Qt4 

That was a description of building from source. I could be wrong, but to 
compile and install from source, you need the complete Qt SDK w/ the libs ...  

It sounds like you could just use the PyQtX distribution (referenced from the 
riverbank page) at http://sourceforge.net/projects/pyqtx/files/Complete/

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