[Qt-interest] QShortcut doesn't work as expected ( was Hide rather than quit on close window event )

Gopalakrishna Bhat gopalakbhat at gmail.com
Sun Oct 31 14:01:53 CET 2010


If i remember right there is another signal emitted(conflictActivated)
if there are multiple shortcuts for the same key. Try connecting to
that.


On 10/30/10, Aaron Lewis <the.warl0ck.1989 at gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi ,
>    So finally i tried those codes , trying to hide my application on
> custom key triggered:
>
>     QShortcut *cut = new QShortcut(this);
>     cut->setKey(Qt::Key_Alt + Qt::Key_F4);
>     cut->setEnabled(true);
>
>     connect ( cut , SIGNAL(activated()), this , SLOT( slotTryHide()) );
>
> And in slotTryHide():
>
> 	qDebug() << "Slot Activated , Hidding ..";
> 	hide();
>
> It just don't work as expected , am i missing sth. here ?
>
> Thanks !
>
> - --
> Best Regards,
> Aaron Lewis - PGP: 0xDFE6C29E
> Key Server: http://keyserver.veridis.com
> Finger Print: 9482 448F C7C3 896C 1DFE 7DD3 2492 A7D0 DFE6 C29E
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.16 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQIcBAEBAgAGBQJMzDtxAAoJECSSp9Df5sKe/tAP/jiK0LsJyEUjaDjrDmfRRKvg
> 1zO4p8rjnzdRPtqJslCt1qoNLvicSH08DrrR8JvT5JWiwWZ9405t2b4wDmZXg13G
> dbiRqyoH4xnZ+5o9dIozdbRK8neWBAs3e+DOp8vuLnJB0EW27HlYiNkakjMsFRvQ
> ynZDHr4sbsJ8PJ1LLm+uL9l1VXnx06seusPe49Rpi+hwpIPZjZTMWDVMrMIiNc2G
> vkegx5C2ABG80cXvg5jqVCMN5JkgmlfXeDrdpZs8HdoflfBIFYNXZuIVkk0x4beY
> x7VaOLNyxh3xSc3EWikqyL5UwEwSZ3Ht6s2WP7pqRG0Z5pYd4WXamfGinEe/A74J
> x6r6ZwF22ef5Zr4nkt++JA3D7he8oFdNh04jukB/JsBy/TSn9cx1yKPA2hfyhH8I
> Vzk/dslvSJpTjyiXU1BY9NkJiJ4o7U/AA6Xt5yGe3oHt87NJ1TQhUZb2EEhSJA/n
> fn63C6KgcNLNdr/K7axxu9L1KbvGmA2s1/+gQ0FUsth0jH9F2oCx/SHEmOJCBgFy
> xAsZg086Yfiq0PKWxCxu1NqtPN2uKC3a1ctqZORThcSdAYQd5aYYumTA1z2c5O5C
> ee63e4cPDgUdBsCi1ERB4pxB21Pmo17UcarmH+KQR1dIFRc65YHy7BdHTAcm+qca
> /mErwL2Jv/4U3c9ygZfQ
> =xhJo
> -----END PGP SIGNATURE-----
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>


-- 
My blog http://gkbhat.blogspot.com



More information about the Qt-interest-old mailing list