Results 1 to 20 of 22

Thread: Skinned Windows (own TitleBar and Borders)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Wink Skinned Windows (own TitleBar and Borders)

    This two little classes let you use own windowframes and titlebars.
    the windows which are created with this class can be resized and moved like normal windows
    and have three buttons on top. For an own skin you will need 9 pixmaps:
    -> left border(sl), left-bottom corner(elu), right-bottom corner(eru), right border(sr),
    titlebar(so), bottom corner(su)
    -> maximize (maxButton), minimize(minButton), close(quiButton)
    if you want to skin your application just set QSkinWidget as Parent. if you want to skin a MainWindow use something like this:
    Qt Code:
    1. QSkinMainWindow *wid = new QStyleMainWindow();
    2.  
    3. MainWindow mainWindow;
    4. wid->setWindowTitle(APP_TITLE);
    5. wid->setCentralWidget (&mainWindow);
    6. wid->resize(550,650);
    7. wid->show();
    To copy to clipboard, switch view to plain text mode 
    enjoy working with this classes, even its somekind of "murx".
    please let me know if you find better ways to realyze things i did in the classes and use them only for opensource-software.
    i hope i will get some feedback!
    P.S. Sorry for my bad english and no comments, i will type them as far as i can...
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Skinned Windows (own TitleBar and Borders)

    i've added resizing on every side an on the edges.
    Attached Files Attached Files

  3. #3
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Skinned Windows (own TitleBar and Borders)

    Now i've optimized the drawing of the Frame-Pixmaps and the resizing of the windows.
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Skinned Windows (own TitleBar and Borders)

    Ok. I wonder that nobody shoutet at me, because the classes didn't work on linux...
    but now they should work on all platforms.
    Please some feedback...
    Attached Files Attached Files

  5. #5
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Skinned Windows (own TitleBar and Borders)

    Quote Originally Posted by kernel_panic View Post
    but now they should work on all platforms.
    Really? Well I got a few comments :
    • Packaging is *REAL* bad... put all three (lib, test and config) in a single package
    • Why do you feel the need to put the lib in a subfolder of its sources instead of in a subfolder of top dir?
    • there are unneeded files in test : makefile, lib bin and headers... use LIBS += -L.. (or -L../QSkinWindows/lib if you keep your current layout) and INCLUDEPATH += ../QSkinWindows
    • there is a convention to use lower case filenames to avoid errors under UNIX systems which are case-sensitive...
    • The test program crashes... It says "Floating point exception"
    • I've not seen any pixmaps anywhere... How do you style the test program?
    I guess that's all for now...
    Current Qt projects : QCodeEdit, RotiDeCode

  6. #6
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Skinned Windows (own TitleBar and Borders)

    ups...
    ok... now it should be better.
    Attached Files Attached Files

  7. #7
    Join Date
    Jan 2006
    Posts
    368
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Thumbs down Re: Skinned Windows (own TitleBar and Borders)

    I do not understand... what are you "distributing"? The zip does not contain a mainlevel project file, and the project file available on the SkinConfig does not compile.

    Did you test the release? What do you expect me to do with it?

  8. #8
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Angry Re: Skinned Windows (own TitleBar and Borders)

    yes i tested it. download the newest version (tar.bz2 file). it works. with this "distribution" which is a class for adding own titlebars and borders to your application.

  9. #9
    Join Date
    Jan 2006
    Posts
    368
    Thanks
    14
    Thanked 18 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Skinned Windows (own TitleBar and Borders)

    Just wanted to tell you that it compiles and works pretty good. Thanks.

    Whats the license of this work? Can I use it on non GPL applications?

  10. #10
    Join Date
    Jan 2007
    Posts
    177
    Thanks
    8
    Thanked 10 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Skinned Windows (own TitleBar and Borders)

    no you can't.only for open source software, please.

  11. #11
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Skinned Windows (own TitleBar and Borders)

    The new package compiles well and looks pretty good. however the handling of mouse events (to click on buttons) doesn't seem to work well : I got warnings about QWidget::grabMouse(), the buttons are not animated and whatever the one clicked the applications gets closed... Am I missing something?
    Current Qt projects : QCodeEdit, RotiDeCode

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.