<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><b style="font-family: Arial; font-size: 13px;"><span>Da:</span></b><span style="font-family: Arial; font-size: small;"> Walter Valenti <waltervalenti@yahoo.it></span><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"><div dir="ltr"><font size="2" face="Arial"> <b><span style="font-weight: bold;">A:</span></b> Discussioni generali sul linguaggio Python <python@lists.python.it> <br> <b><span style="font-weight: bold;">Inviato:</span></b> Marted́ 26 Febbraio 2013 11:47<br> <b><span style="font-weight: bold;">Oggetto:</span></b> [Python] Domanda su pyQt<br> </font> </div> <br>Ho fatto un semplice
script con PyQt per genarare un splash screen:<br> [ cut]<br><br>app = QApplication(sys.argv)<br>splash_pix = QPixmap('/home/walter/.mozilla/about.png')<br>splash = QSplashScreen(splash_pix,Qt.WindowStaysOnTopHint)<br>splash.setMask(splash_pix.mask())<br>splash.show()<br>app.exec_()<br><br><br>Come posso fare in modo che lo splash non si chiuda cliccandoci sopra ?<br><br>Walter<br><div style="background-color: transparent;"><br></div><div class="yui_3_7_2_17_1361890141405_58" style="font-size: 12pt;"><div class="yui_3_7_2_17_1361890141405_62" style="font-size: 12pt;"><div dir="ltr"><font size="2" face="Arial"><hr size="1"><br><b></b></font></div><div dir="ltr"><font size="2" face="Arial"><br></font></div></div></div><div style="font-size: 12pt;"><span>Ciao Walter,</span></div><div style="background-color: transparent;"><span>devi derivare la QSplashScreen e re-implementare la mousePressEvent. Ad esempio:</span></div><div style="background-color:
transparent;"><span><br></span></div><div style="background-color: transparent;">class MySplashScreen(QSplashScreen):</div><div style="background-color: transparent;"><span class="Apple-tab-span" style="white-space: pre;"> </span>def mousePressEvent(self, event):</div><div style="background-color: transparent;"><span><span class="Apple-tab-span" style="background-color: transparent; white-space: pre;"> </span><span style="background-color: transparent;">pass</span> </span></div><div style="font-size: 12pt;"><br></div><div style="background-color: transparent;"><br></div><div style="background-color: transparent;">Gianni</div> </div> </div> </div></body></html>