Results 1 to 5 of 5

Thread: QPrintDialog appearance

  1. #1
    Join Date
    Jun 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default QPrintDialog appearance

    Hi, I have a Qt 4.6.3 app using QPrintDialog on Windows 7. I've noticed that the contents of the QPrintDialog (and QPageSetupDialog) windows are using older "square" controls, rather than the Windows 7 theme.

    I can't see anything in the Qt source which is requesting some kind of older theme, and they're both native dialogs (e.g., going through PrintDlgEx), so why is my app getting this older look?

    Attached is an image from my app (what I have) and Notepad (what I'd like).
    Attached Images Attached Images

  2. #2
    Join Date
    Jun 2008
    Location
    Rome, Italy
    Posts
    95
    Thanks
    19
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QPrintDialog appearance

    Did you have tried a setStyle("plastique"") from your QApplication?

  3. #3
    Join Date
    Jun 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QPrintDialog appearance

    No, I don't change the global application style so it should be unchanged from the default native style.

    I don't think that's relevant here though, as the print/page setup dialogs are native dialogs in 4.6.3 (so they're being drawn by Windows, not by Qt).

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QPrintDialog appearance

    Can you reproduce this unexpected behaviour using a minimal example?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jun 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QPrintDialog appearance

    The imageviewer sample app didn't show the problem, but that gave me a test case to compare against - thanks.

    It turns out qmake automatically inserts a manifest request for Common Controls 6.0.0, which is what triggers the XP appearance vs the square "classic" look.

    To do the same in an app that's not being built with qmake you need to include some extra information in your manifest (slightly different setup for VS 2005 or later can be found here).

Similar Threads

  1. Replies: 1
    Last Post: 20th February 2010, 12:42
  2. Modifying Appearance of QScrollbar
    By Stobie in forum Qt Programming
    Replies: 2
    Last Post: 26th January 2010, 22:19
  3. Replies: 1
    Last Post: 7th October 2008, 12:11
  4. How to improvise listViewItem appearance
    By qwakaw in forum Qt Programming
    Replies: 1
    Last Post: 1st September 2008, 11:01
  5. QMessageBox buttons appearance
    By yartov in forum Qt Programming
    Replies: 6
    Last Post: 26th June 2008, 01:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.