<html><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:10pt"><br><div>><br>><br>>Come posso fare in modo che lo splash non si chiuda cliccandoci sopra ?<br>><br>>Walter<br>><br><br>><br>>Ciao Walter,<br>>devi derivare la QSplashScreen e re-implementare la mousePressEvent. Ad esempio:<br>><br>><br>>class MySplashScreen(QSplashScreen):<br>>def mousePressEvent(self, event):<br>><span class="tab"> </span>pass <br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;">Non funziona. A logica sembra giusto.</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family:
verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;">#!/usr/bin/python<br><br>from PySide.QtCore import *<br>from PySide.QtGui import *<br>import sys, time<br>import signal<br><br>signal.alarm(2)<br><br>class MySplashScreen(QSplashScreen):<br> def __init__(self):<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.processEvents()<br> app.exec_()<br> def mousePressEvent(self,event):<br> pass<br> <br>sp = MySplashScreen()</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: verdana,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div></div></body></html>