Reply
Thread Tools
Posts: 292 | Thanked: 131 times | Joined on Dec 2009
#11
Originally Posted by mikec View Post
here is class definition for my Stacked Window, which contains a couple of buttons and text edit widgets
Can you post the complete working code? I'm looking for working examples.

Last edited by soeiro; 2010-03-24 at 13:44. Reason: Improved clarity
 
Posts: 103 | Thanked: 8 times | Joined on Jun 2009
#12
hi all,
is it possible to in tall python-telepathy and python-core on OS2008?
if yes what's the procedure?
thx
 
EmaNymton's Avatar
Posts: 141 | Thanked: 267 times | Joined on May 2010 @ Germany
#13
I upgraded to PR1.2 today and the code doesn't work anymore.
Every application which uses stacked windows opens a new window now instead of a stacked one.
Can somebody confirm this? Any ideas to get the stacked effect back (other than downgrading to PR1.1) ?
 
Posts: 144 | Thanked: 134 times | Joined on Jan 2010 @ Hamburg
#14
There's an extension in QT for maemo specific functions:

http://doc.qt.nokia.com/qt-maemo-4.6...es-maemo5.html
http://doc.qt.nokia.com/qt-maemo-4.6...es-maemo5.html

But I don't know how to call it via PyQT...
 
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#15
Hi,

i do it this way (http://gitorious.org/khteditor/khted...master/main.py) :

Code:
from PyQt4 import QtCore, QtGui
from PyQt4.QtCore import Qt
Code:
    def about(self,widget):
        #QtGui.QMessageBox.about(widget, ("About KhtEditor"),
        #        ("<p><b>KhtEditor</b> is a source code editor "
        #                "Mainly designed for Maemo and Meego.</p>"))
        aboutWin = QtGui.QMainWindow(widget)
        aboutWin.setAttribute(Qt.WA_Maemo5StackedWindow)
        aboutLabel = QtGui.QLabel('<center><b>KhtEditor</b> %s<br><br>A source code editor designed for ease of use on small screen<br><br>By Beno&icirc;t HERVIER (Khertan) </center>' % self.version)
        aboutWin.setWindowTitle('About KhtEditor')
        aboutWin.setCentralWidget(aboutLabel)
        aboutWin.show()
widget here is a QMainWindow.
It s should works from what i see in the documentation, but it s look like as a simple window.
 

The Following 2 Users Say Thank You to Khertan For This Useful Post:
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#16
I have done same thing in next release of maesynth, and its not stacking for me. press control backspace, and you will see a load of windows. no stacking.
edit
for PR1.2
__________________
N900_Email_Options Wiki Page

Last edited by mikec; 2010-05-26 at 17:58.
 
Posts: 144 | Thanked: 134 times | Joined on Jan 2010 @ Hamburg
#17
you have to add foo.setAttribute(Qt.WA_Maemo5StackedWindow)
for every window down from the main window. then it worked for me.
 
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#18
Originally Posted by mbo View Post
you have to add foo.setAttribute(Qt.WA_Maemo5StackedWindow)
for every window down from the main window. then it worked for me.
ah so you need to do it for the main window also
Going to try it now
__________________
N900_Email_Options Wiki Page
 
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#19
I'm putting this in the constructor for each window

self.setAttribute(Qt.WA_Maemo5StackedWindow)

and its stlll not stacking

can you post your code
__________________
N900_Email_Options Wiki Page
 
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#20
OK This is now fixed for future ref, you still need to parent the stacked window like the PR1.1 way, AND also add the attribute

This example has a main window call the config window, which can then call the beat window. Three layers.

Code:
class MainWindow(QMainWindow, Ui_MainWindow):
    """
    Class documentation goes here.
    """
    def __init__(self, parent = None):
        """
        Constructor
        """
        QMainWindow.__init__(self, parent)
        self.setupUi(self)

        self.configWin=configWindow(self)
        self.beatWin=beatWindow(self.configWin)
        try :
            self.setAttribute(Qt.WA_Maemo5StackedWindow)
                    self.configWin.setAttribute(Qt.WA_Maemo5StackedWindow )
            self.beatWin.setAttribute(Qt.WA_Maemo5StackedWindow )
            USE_MAEMO=True
        except:
            USE_MAEMO=False
__________________
N900_Email_Options Wiki Page
 

The Following 3 Users Say Thank You to mikec For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 03:37.