Well, setQuitOnLastWindowClosed(False) solved that problem now the
pressKeyEven works perfect:
if event.key() == QtCore.Qt.Key_Escape and (event.modifiers() &
QtCore.Qt.AltModifier):
self.hide()
Now, i used closeEvent to close my app from the systray, so i've
implemented a
Sorry.. i mean alt+f4...
2007/8/23, Henrik Pauli <[EMAIL PROTECTED]>:
>
> Hmmm, I have never in my life pressed alt-esc in KDE. alt-f4 yes
> (which I remember being Close on the default scheme, not just on the
> "Windows like" key scheme), esc yes (which triggers a Cancel/Close
> action on most d
> What I suddenly think about is that you should try to catch some
> signal (I can't remember the name, but do read up on what signals and
> slots a QMainWindow/KMainWindow has) that is related to quitting the
> application. I seem to remember there are methods which get triggered
> at exit --
Hmmm, I have never in my life pressed alt-esc in KDE. alt-f4 yes
(which I remember being Close on the default scheme, not just on the
"Windows like" key scheme), esc yes (which triggers a Cancel/Close
action on most dialogs).
What I suddenly think about is that you should try to catch some
signal
Hi David,
The thing that my app has systray support, and when i close the app with the
Close button, it goes there.
So, many users press Alt+Esc to close their apps. and this is a problem for
me, cause my app will not go into the systray.
Will be enough if even exist the possibility to block this
On Thu Aug 23 15:22:29 BST 2007, Gustavo A. Díaz wrote:
> Yes, which i sould use X11 internals indeed.
>
> I will have to investigate about this...
Is it really necessary to use Alt-Esc in your application? You could have
the same problem with any keyboard shortcut - some of your users might
hav
Yes, which i sould use X11 internals indeed.
I will have to investigate about this...
Thanks.
Cheers.
2007/8/23, Andreas Pakulat <[EMAIL PROTECTED]>:
>
> On 23.08.07 10:01:03, "Gustavo A. Díaz" wrote:
> > Anyway that do not work cause for sure, now that i am thinking, that key
> > combination
On 23.08.07 10:01:03, "Gustavo A. Díaz" wrote:
> Anyway that do not work cause for sure, now that i am thinking, that key
> combination to close an app is reserved by my window manager, which is
> KDE... so maybe i will have to implement something related to kde (or PyKDE)
>
> like Sundace make m
Andreas Pakulat escribió:
On 23.08.07 00:54:59, "Gustavo A. Díaz" wrote:
I did this time:
def keyPressEvent(self, event):
if event.key() == QtCore.Qt.Key_Escape:
self.hide()
if event.key() == QtCore.Qt.Key_Alt + QtCore.Qt.Key_Esca
On 23.08.07 00:54:59, "Gustavo A. Díaz" wrote:
> I did this time:
>
> def keyPressEvent(self, event):
> if event.key() == QtCore.Qt.Key_Escape:
> self.hide()
>
> if event.key() == QtCore.Qt.Key_Alt + QtCore.Qt.Key_Escape:
> self.hide()
Gustavo A. Díaz wrote:
> But this method is applied when you have a Menu bar right?
No.
This method is applied when you add an action to a QWidget, as I said in
my previous email. It just so happens that if the QWidget is a menu or
a toolbar, Qt creates a menu entry or a toolbutton, respectiv
I did this time:
def keyPressEvent(self, event):
if event.key() == QtCore.Qt.Key_Escape:
self.hide()
if event.key() == QtCore.Qt.Key_Alt + QtCore.Qt.Key_Escape:
self.hide()
Esc key only, hides the app.
Alt + Esc does not, it just
But this method is applied when you have a Menu bar right? Which i do
NOT use.
I just want the key combination Alt+Esc to hide my app.
Examples please?
Thanks.
Sundance escribió:
Gustavo A. Díaz wrote:
As i said, only Escape key.
I want to know to do the same but with al
Gustavo A. Díaz wrote:
> As i said, only Escape key.
>
> I want to know to do the same but with alt + Escape... or which
> is the way to do it...
Hi Gustavo,
I am not sure I understand what it is that gives you trouble here. Is it
that you don't know how to go about it, or is it that it do
As i said, only Escape key.
I want to know to do the same but with alt + Escape... or which is
the way to do it...
cheers.
Henrik Pauli escribió:
What I was thinking about was this: http://doc.trolltech.com/4.3/qt.html#WidgetAttribute-enum
-> Qt::WA_DeleteOnClose as it's now called. As
What I was thinking about was this:
http://doc.trolltech.com/4.3/qt.html#WidgetAttribute-enum ->
Qt::WA_DeleteOnClose
as it's now called. As I said, I could be completely wrong with assuming it
being the culprit, but anyway.
Now... isn't the code you pasted actually handling Escape, not Alt+Escap
I forgot, that code only hide the app when i press Esc key, i want alt
+ Esc key combination to do the same...
Thanks.
Uğur Çetin escribió:
22-08-2007 01:18 Gustavo A. Díaz:
I am trying to catch the keyPressEvent of alt + esc combination with:
def keyPressEvent(self, event):
I think you are missunderstanding
I have an app, i have a systray, when i press the close button, it hide
on the systray, cause i've implemented that...
Now i want to hide the app too when i press alt+esc...not closing it.
Thanks...
Cheers.
Uğur Çetin escribió:
22-08-2007 01:18 Gusta
22-08-2007 01:18 Gustavo A. Díaz:
> I am trying to catch the keyPressEvent of alt + esc combination with:
>
> def keyPressEvent(self, event):
> if event.key() == QtCore.Qt.Key_Escape:
> self.hide()
>
> And this has no effect, the app closes anyway. What i want is to h
what??
Henrik Pauli escribió:
Off the top of my head, and as such it could be completely
wrong: WDestructiveClose?
On 8/22/07, "Gustavo A. Díaz" <
[EMAIL PROTECTED]> wrote:
Hi!!
I am trying to catch the keyPressEvent of alt + esc combination with:
def keyPressEvent(self,
Off the top of my head, and as such it could be completely wrong:
WDestructiveClose?
On 8/22/07, "Gustavo A. Díaz" <[EMAIL PROTECTED]> wrote:
>
> Hi!!
>
> I am trying to catch the keyPressEvent of alt + esc combination with:
>
> def keyPressEvent(self, event):
> if event.key() == Qt
Hi!!
I am trying to catch the keyPressEvent of alt + esc combination with:
def keyPressEvent(self, event):
if event.key() == QtCore.Qt.Key_Escape:
self.hide()
And this has no effect, the app closes anyway. What i want is to hide
the app and not close it.
What i
22 matches
Mail list logo