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
    Mar 2006
    Location
    somewhere between France & Germany
    Posts
    34
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Red face Re: setWindowTitle() with nice font

    Quote Originally Posted by high_flyer
    Just wanted to say that I just implemented this and its much easier then I thought, and it works just fine.
    I will make a designer plugin out of it so I can use it in future such projects.
    Just so you'll know this method works ok.
    hey !

    Will you share the source of your plugin ?
    • The Manual said the program required Win95 or better, so I installed Linux.
    • Newton was a pessimist.
    • no Risk! no FuN!

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

    Default Re: setWindowTitle() with nice font

    Sorry mate, this project is propreity code, and my boss would not take it well to find out that the time he paid to develop this is now freely available...
    Also, I am using a custom styled button plugin (for the system buttons) which is quite a lot of code...
    But I can help you to do it your self.
    It really is not that hard.
    All you need is a QLabel a spacer and 3 buttons, put them in a layout and there you have it.
    In your QLabel you can show what ever you want any way you want it as a title.
    Then you put this custom widget on a dialog, create the dialog with out a titlebar.
    In your title bar you catch the mouse events calculate the movement and use that to move your dialog.
    If you have more questions feel free to ask.

    Hope this helps.

    EDIT: I'll try to talk to my boss to allow me to release the code.
    But that wont be before next week.

  3. #3
    Join Date
    Mar 2006
    Location
    somewhere between France & Germany
    Posts
    34
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Red face Re: setWindowTitle() with nice font

    Quote Originally Posted by high_flyer
    Sorry mate, this project is propreity code, and my boss would not take it well to find out that the time he paid to develop this is now freely available...
    No problem ! I fully understand

    I just asked because at the same time I would have had an interesting qtdesigner plugin example of something which I was wondering about (I was the initiator of this thread).

    About the plugin, it also would have been interesting because I made a reimplementation of a QLineEdit and a QSpinBox recently and I was wondering how easy it was to do a plugin for QtDesigner out of those and if then it was possible to have some more/defined parameters which could be changed in the qt designer properties toolbox of the widget !
    Well... but this is an other question. It would just have been a nice start as I never tried to do a qtdesigner plugin..
    • The Manual said the program required Win95 or better, so I installed Linux.
    • Newton was a pessimist.
    • no Risk! no FuN!

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

    Default Re: setWindowTitle() with nice font

    I was wondering how easy it was to do a plugin for QtDesigner out of those
    This is easy.
    You can use the clock custom plugin example as a base to work on for the plugin class it self.
    If you have already a custom widget that you want to make available as a designer plugin, then its few minutes work.

  5. #5
    Join Date
    Jan 2006
    Location
    Moscow, Russia
    Posts
    20
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: setWindowTitle() with nice font

    I'm using fvwm2. I tried to create borderless dialog with use of Qt3. I think that there is no difference of this feature implementation between Qt3 and Qt4.

    1. This dialog was not appeared in the window list which is activated by ALT+TAB.
    2. I have virtual screen which is divided into switchable four areas. When I switch between these areas the dialog remains always visible. It behaves like if to apply 'Stick". Does this work properly when you switch between several desktops in the KDE?
    3. I configured my focus so that the widget under mouse takes the focus. But my dialog doesn't follow this setting.

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

    Default Re: setWindowTitle() with nice font

    1. This dialog was not appeared in the window list which is activated by ALT+TAB.
    As the docs say, some of the flag interpretation/implementation is up to the windowing system.
    This enum type is used to specify various window-system properties for the widget. They are fairly unusual but necessary in a few cases. Some of these flags depend on whether the underlying window manager supports them. (See the toplevel example for an explanation and example of their use.)
    2. I have virtual screen which is divided into switchable four areas. When I switch between these areas the dialog remains always visible. It behaves like if to apply 'Stick". Does this work properly when you switch between several desktops in the KDE?
    I didn't check if there is an entry in alt+tab, but I guess there should be since there is an instance in the task abr, I will check and let you know.
    Other then that it works just like any other dialog.

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.