summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4c74097)
Qt resets the font of all widgets if the application stylesheet is set.
Thus, we intercept the ChangeEvent and restore the custom font for FontSelector.
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <QLabel>
#include <QPushButton>
#include <QLabel>
#include <QPushButton>
+void FontSelector::changeEvent(QEvent *e) {
+ if(e->type() == QEvent::StyleChange) {
+ _demo->setFont(_font);
+ }
+}
+
+
signals:
void fontChanged(const QFont &);
signals:
void fontChanged(const QFont &);
+protected:
+ void changeEvent(QEvent *e);
+
protected slots:
void chooseFont();
protected slots:
void chooseFont();