Results 1 to 16 of 16

Thread: setWindowTitle() with nice font

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: setWindowTitle() with nice font

    I think your custom titlebar helps set the font you like. But some other problems will appear:
    My motivation for the custom title bar is not the fonts, but the general look (style).
    But my title bar allows any font or pixamap as a title.
    1. The configuration (position, color etc) of control buttons (minimize, close, maximise) will be different from button configuration of managed (by window manager) widgets. Also the color of titlebar will be different. It will not be good for some sort of applications.
    That is why I don't use normal push button, but a custom widget I made which is a styled button, which allows the user to "skin" it as he/she likes, in addition the button has the ability to have any amount of states and a pixmap to each state (i.e mouseover, pressed etc).
    My styled button offers all the nessery "look" customization you make it fit to the users wishes.
    This point of yours is correct, but was dealt with.
    3. You should test whether your widget will appear in the window list? I'm not sure. I think, no!
    This is true, I will have to check this, thanks for the tip
    4. May be, some users dislike your font.
    As I said, the title bar plugin allows customizing its look and font as the user wants them.
    The programmer using this plugin can then query the widnow manger and use the window manager colors and fonts, but for that he wont need this plugin.
    I think, that you shouldn't write your custom titlebar without absolute necessity.
    Hehe... do you think I would do such a think just for fun?
    Hmm... I might... but this is not the case..

    Besides, as I said in my previous post, the REALY right way to do this, would be to derive QStyle (I used that aproach on the styled buttons), but it is much harder than the above implementation.
    Thanks for the input!

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows
    Thanks
    21
    Thanked 418 Times in 411 Posts

    Default Re: setWindowTitle() with nice font

    3. You should test whether your widget will appear in the window list? I'm not sure. I think, no!
    Ok I tested it, and at least under KDE there is an instance in the task bar (normaly like any other window)
    Last edited by high_flyer; 17th March 2006 at 20:04.

Similar Threads

  1. font can not be changed
    By ashishsaryar in forum Qt Programming
    Replies: 4
    Last Post: 28th May 2008, 15:32
  2. Automatic font selection
    By NTwoO in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 27th April 2007, 12:40
  3. Font not Antialiasing
    By ChasW in forum Qt Programming
    Replies: 6
    Last Post: 21st January 2007, 18:12
  4. Qt renders wrong font
    By durbrak in forum Qt Programming
    Replies: 8
    Last Post: 2nd November 2006, 14:36
  5. Determine system font
    By niala in forum Qt Programming
    Replies: 2
    Last Post: 21st March 2006, 22:45

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.