You are not logged in.

#1 2016-09-09 09:40

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Documentation for python-tqt

I am trying to write an app for Q4OS using python-tqt but cannot seem to find any documentation for it, I have tried pydoc which returns a list of modules (qt, qtcanvas, qtnetwork, qtsql, qttable, qtui, qtxml) but I cannot find any information on these, pydoc error info shows AttributeError: 'module' object has no attribute '__file__' when I click on any of these so I have to assume there are no help strings available. Any suggestions would be most welcome.

Dai

Offline

#2 2016-09-09 09:59

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,465
Website

Re: Documentation for python-tqt

Run in terminal:
$ sudo apt-get install python-tk python-tqt
$ xrdb -load /dev/null
$ pydoc -g
Is this what you were searching for ?

EDIT: Sorry, there are no TQT pyton modules available, we will check another way ...

Offline

#3 2016-09-09 10:03

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,465
Website

Re: Documentation for python-tqt

There is a HTML documentation in:
/usr/share/doc/python-tqt-doc/html/

as wel as TQT examples:
/usr/share/doc/python-tqt-doc/examples/

EDIT: 'python-tqt-doc' package must be installed

Offline

#4 2016-09-09 10:30

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: Documentation for python-tqt

Found it thanks smile

Offline

#5 2016-09-09 12:13

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: Documentation for python-tqt

None of the "TQT Examples" work! they all import "qt" which is not available, I tried changing the import to "python_tqt" but that had no effect, am I missing something obvious?

Also errors when running the most basic of scripts

RuntimeError: the sip module implements API v11.0 to v11.1 but the qt module requires API v7.1

Last edited by Dai_trying (2016-09-09 12:16)

Offline

#6 2016-09-23 09:18

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,465
Website

Re: Documentation for python-tqt

We have attached fixed and working python-tqt examples, thanks to Trinity devs. Steps to get it run:
$ sudo apt-get install python-tqt python-tqt-doc
extract 'examples.tar.gz' into some working directory and run:
$ python tut1.py

Please report back, if it works now.


Attachments:
gz examples.tar.gz, Size: 264.01 KiB, Downloads: 1,260

Offline

#7 2016-09-23 10:10

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: Documentation for python-tqt

Thanks guys, I will look at them a bit later today and post back.

Offline

#8 2016-09-23 16:33

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: Documentation for python-tqt

Ok, after looking at some of the examples I should be able to start doing something with tqt, but I have also been googling around for any sort of documentation or information on using tqt and it is very scarce indeed. If there are any references available online or downloadable I would be greatful for the information.

EDIT:
    Specifically anything about the systemtrayicon

Last edited by Dai_trying (2016-09-23 17:39)

Offline

#9 2016-09-23 22:18

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: Documentation for python-tqt

It would appear (if I have read correctly) that TQT is based on Qt3 and as such there is no system tray functionality, it would therefore not be possible to code the updater script with python-tqt. So with that in mind, and the fact that documentation is not available ( or I haven't found anything useful ) I will have to stick to python-qt4 and python-pyqt5 for now at least.

Offline

#10 2016-09-27 18:00

olzeke51
Member
From: So. Carolina, USA
Registered: 2016-08-24
Posts: 22

Re: Documentation for python-tqt

@q4osteam --what QT version are you using - especially in light of LXQT that you alluded to supporting.
@dai -- do you have to develope for both p..-qt4 and p..-pyqt5?? [I'm new to dev'ing -- it seems awful daunting -- I looked at a blog on the python-TQT(for Trinity) and he bailed on it]
Thanks
PS edit: have you looked at eric as a python platform - it uses PyQt for widgets (don't know if it has the taskbar you spoke of);
Detlev Offenbach is the maintainer.

Last edited by olzeke51 (2016-09-27 18:59)


The journey is . . . the reward.

Offline

#11 2016-09-27 19:55

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: Documentation for python-tqt

I develop in whatever takes my fancy really, but I do like Qt and 4 and 5 are very similar.
I just had a quick look at eric and IIRC I tried it some time back but eventually settled for coding in geany, but now I have more experience in python and often need debugging features I find Pycharm stands head and shoulders above any other free IDE for python. But when I first tried it a few years ago I gave up as it seemed too much for my (then) very limited abilities. Not that I'm that good now, but I'm a lot more comfortable with python than I used to be. smile

Offline

#12 2016-09-27 20:13

olzeke51
Member
From: So. Carolina, USA
Registered: 2016-08-24
Posts: 22

Re: Documentation for python-tqt

thanks @Dai,
the wikipedia had a comparison chart for IDE's - I noticed geany didn't have a debugger too!
I think a noob-dev would need one!!!!
Has QT5 stabilized somewhat?  I got the impression a month ago (?maybe q4osteam comment) that they lacked much of what QT4 had.
+
Does your update script allow you to chose which package to update??
GZ


The journey is . . . the reward.

Offline

#13 2016-09-27 20:31

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: Documentation for python-tqt

I don't think qt5 lacks anything that qt4 has but I could be wrong as I'm a hobbyist not an expert big_smile

At the moment the updater just updates everything, but I have been looking around and may have found a solution to choose updates but it will be a while before I get it all figured out properly. And even longer til it's implemented smile

Offline

#14 2016-11-09 10:14

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,465
Website

Re: Documentation for python-tqt

As from Q4OS 1.8, Python TQT works out of the box. You only need to install 'python-tqt python-tk python-tqt-doc' packages.

Offline

#15 2016-11-09 16:47

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: Documentation for python-tqt

Will be installing and testing very shortly, thanks guys smile

Offline

#16 2016-11-09 19:49

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: Documentation for python-tqt

I have installed the required packages and looked through the documentation and examples but can find no mention of a systemtrayicon class (or similar), I think the problem is that it was not introduced to Qt until Version 4.2 and TQt is based on 3.x So I cannot currently see a way of using TQt for the updater as it is currently a PyQt4.QtGui.QSystemTrayIcon and there is no equivalent available.

Offline

#17 2016-11-09 21:26

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,465
Website

Re: Documentation for python-tqt

Dai_trying wrote:

So I cannot currently see a way of using TQt for the updater...

We may extend python TQT with some system-tray API in the future. In any case, thank you for developing QT4/5 updater, keep up the excellent work smile

Offline

#18 2016-11-09 21:49

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,992

Re: Documentation for python-tqt

You're welcome, I am enjoying creating and modifying it. (new version now available 0.0.1-12)

Offline

Board footer

Powered by FluxBB