Page 3 of 3 FirstFirst 123
Results 41 to 46 of 46

Thread: QSkinWindows Classes

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

    Default Re: QSkinWindows Classes

    Quote Originally Posted by bantri View Post
    Well i guess then you´re out of luck in this matter then...
    I don't feel that way. I think currently I do have total control over the desktop.

    As a curiosity i´ve calculated the area in a maximized app my screen, i use 1152x864 pixels=995328 pixels) and the titlebar uses 1152x20=23040 pixels which represents 2.31% of the total area in a maximized application.

    it means that for the other 97.69%, if i wish to make a total carnival using styles, i can... and those styles will change only if i choose to do so...
    I'm afraid I don't understand what you mean. If you want to have total control (as the application developer) over 100% of the screen, just enter full screen mode.

    perhaps you can ask Qt guys to remove all the styling option so you can get a 100% of compatibility with the operating system...
    Could you explain? You can always remove the decorations by passing an appropriate hint to QWidget.

    Mimicking any OS appearance is not my objective, i just think that it would be nice and better looking, and more important than this: to be COHERENT -> to make the style of the frame similar/equal/compatible to the style inside the frame.
    I tend to do it the other way - to make the interior compatible with the exterior, but I guess it's just a matter of choice. If I wanted to get rid of system decorations, I'd use a frameless window or enter full screen mode.

    As i see, there should be an option where the gui asks just for an empty rectangle in the desktop area, and does all the finishing, (frame, titlebar and control buttons included) i know that windows have this resource, but don´t know about other OS´s and this is one of the reasons it would be useful to have this styling option.
    Well... please look into QWidget API then. It is all there and it is currently what kernel_panic's solution does.

    Since windows 2000 there are resources for dealing transparency, layering, frameless windows but it seems that Qt forgot to use those finishing capabilities to make a 100% stylable gui, it´s easy to transfer the responsibility for skinning to the OS but somehow i think that adding fantastic resources for doing things inside the client area and not having the small remaining work of adding a mere top level widget to do an obvious resizing frame, with some title and buttons seems incomplete to me.
    From what you say it seems that you should take a closer look at Qt capabilities. Of course it's not all there, but then Qt is not meant for that and never was. It's not an ultimate solution to everything. It's nice that something works on Windows 2000 or Windows Vista, but what happens if someone starts the application on a system that doesn't support all these gizmos? Your beautiful glassy/transparent/whatever style would look broken. Qt provides window and widget transparency on systems that do support it in a fail-safe way. For more complicated things, you need to do some system dependent work (like enabling ARGB windows on X11) and when you do, additional capabilities are there (in Qt) for you to make use of.

    They made a gazillion lines of source code to do everything you can imagine for graphical objects, complex styles, vector drawing, affinne transforms, a form designer to compose the layout and styles and stuff but when it comes to the top level frame...
    Well... Currently there are almost 9000 threads on this forum and one of them concerns customizing drawing system decorations and remaining threads concern things like layouts, graphical objects, complex styles, vector drawing, transformations and form designing. With all do respect, these features are something that all developers use to implement their applications and only a few applications need styling system decorations. That's where those "gazillions" of code lines come from.

    That´s the responsibility of the OS, the gazillion lines of source code are not able to do a lousy resizable frame, a title with a background gradient and a bunch of buttons...
    Yep... and it can't bake cookies. Darn... I'd like a cookie baking API so much... It'd be best if it was hardware-accelerated too!

    Is it so difficult to acomplish this task that it should be done by some user?
    I'm glad that Trolltech focuses on bringing a multimedia framework to Qt and on bringing Qt to new platforms (like WindowsCE, Windows Mobile, etc.) instead of dealing with deep window manager (!!! not platform!) dependent code for hacking system decorations. But hell... that's my opinion and you don't have to agree.

    Here you go: http://www.trolltech.com/developer/task-tracker
    You can report your suggestion there. Maybe the Trolls will share your point of view and write another gazillion lines of code to do what you ask.

    Wouldn´t be better to also in the form designer to change the style of the application frame along with the contents, so they would match?
    What if I start your application on a system that has the title bar below the client area with close button in the top left corner of the window and maximize and minimize buttons on the right edge of the window? I don't think your forced decoration will fit my system. Sorry, I simply don't agree with your point of view and based on what the Trolls do, I doubt they will as well.

    I´m just thinking bigger here, i think that it would be very attention catching to make some apps using a gui with some nice drop shadows, custom buttons, transparency, even when running OS´s like 2000, and not having to count on some "special patch" (at least there is a patch, and it´s great) to make it work a 100%.
    Great, but this is not something that should be implemented on the application level. Please, stop thinking "Windows" when you mean "Operating System".

    i can be wrong... but then... how about doing some voting for any gui users and ask them:
    Please start a new thread with a poll for that. We've trashed this thread enough.

    Then again, why should they include the styling facility at all?
    To make your app look good on different platforms through a use of platform independent API. Kiosk platforms and other single application platforms included. These don't contain system decorations at all.

    Remember... I´m just pledging about the remaining 2.31% area.
    QWidget::showFullScreen()
    I guess then, that, making gui with Qt is easy "as long" as you don´t wan´t to style the application frame...
    after all this is the supposed responsibility of the OS.
    No, not the OS... Window manager - these are completely different entities. You're thinking "Windows" again. And even Windows toolkits don't provide API for styling system decorations. You have to dive into bare WinAPI to do that.

    i think about some simple goals:

    To make the best style looking application as possible with the least work as possible.

    Best looking to me does include the application frame to have the same appearance of it´s contents.
    From what you say I think that for you the look of the application comes first - apps should look nice, regardless of the fact that they don't do anything. I like the object oriented environment with high level frameworks like Interview, Arthur, Scribe or Graphics View. And I like it that I can ask some person who is more graphics capable than I am to use stylesheets to style the application for me without having to write a single line of code. Seems that we have different goals and there is no way we'll agree here.

    What´s the point in styling the client area easily if, when it comes to make a similar top-level frame you have to accept that it will look different, and there will be no facility to manage it in some easy way?
    Who said you have to accept it? Get rid of it if you don't want it! Draw your own frame, your own buttons and everything else you want. You can even use setMask() to neutralize a portion of the decoration if you wish. It's all there for you and you can use it. Of course if you want to disable the window manager for your application, you'll have to handle all events yourself, But seems that's an obvious price to pay.

    who owns the responsibility for the transition frame beetween the app and the OS desktop?
    The Window Manager.

    I´m just thinking versatile here, it is obvious that a gui that allows control in this area will have one more aspect to be popular than guis that don´t. And my point of view as a programmer is that if there is some way to just make an application to stand out above others in this aspect it would be an attention catcher, showing skinned windows like vista without having vista is an attention catcher, even if it does mimic vista because it opens a range of new possibilites, which don´t necessarily include mimicking.
    So why don't you sit down, implement it and start selling it to the vast area of developers just waiting to customize their system decorations? Just do it properly. Kernel_panic's solution looks nice in some cases but is a terrible hack. It's very simple but already contains many constraints. And you can't customize system decorations with it. You bypass the window manager and do everything it does yourself. Which immediately means you're losing all advanced capabilities of the window manager, be it kwin or Aqua. And behind the scenes it also means your application seizes to be portable. If you accept those restrictions, you are very welcome to use the solution. If your clients start complaining they can't do this or that (for instance stick the application window on top of other windows, move the window to another desktop or another screen), maybe you'll start seeing it my way.

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

    Default Re: QSkinWindows Classes

    on qt-apps.org is the new version available!
    it is now just one qobject.
    to implement styles link the library, include the qskinobject header and
    call were you want to init the skins:

    Qt Code:
    1. QSkinObject * object = new QSkinObject(this);
    To copy to clipboard, switch view to plain text mode 

    Thanks to wysota for the great tip with the object!

  3. #43
    Join Date
    Mar 2007
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QSkinWindows Classes

    hi kernel_panic

    I've been trying out your QSkinObject. Looks great, but I have two problems with loading a QMainWindow in your test program.
    - Where the window title should be, I see a rectangle over it.
    - If I try to add a MenuBar it sets itself on top of the titlebar and the buttons

    I've added a screenshot of the windows.


    could you give some advise?

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

    Default Re: QSkinWindows Classes

    yes....
    for the mainwindow use sth like that:

    Qt Code:
    1. MyMainWindow w;
    2. QSkinObject *o = new QSkinObject(&w1);
    3. o->startSkinning();
    4. w1.setCentralWidget(&w);
    5. w1.show();
    To copy to clipboard, switch view to plain text mode 

    and the other one can be fixed with the newer lib
    Attached Files Attached Files
    Last edited by jpn; 11th March 2008 at 10:41. Reason: missing [code] tags

  5. #45
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QSkinWindows Classes

    Be careful!
    Qt Code:
    1. {
    2. MyMainWindow w;
    3. ...
    4. w1.setCentralWidget(&w); // w1 becomes w's parent
    5. w1.show();
    6. } // (*)
    To copy to clipboard, switch view to plain text mode 

    (*) First "w1" goes out of scope and deletes its children, including "w". Then "w", which was already deleted by its parent ("w1"), goes out of scope => crash!
    J-P Nurmi

  6. #46
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QSkinWindows Classes

    Hi.

    Have anyone .svg file for Vista Aero Widgets?
    I'm using qskinobject 0.8 from http://qt-apps.org/content/show.php/...?content=67309 and there are only blue.svg and template.svg files in source files.

Similar Threads

  1. QtTest: Unittesting in several classes
    By Jojo in forum Qt Programming
    Replies: 2
    Last Post: 25th August 2009, 12:38
  2. Design classes in OOP?
    By vql in forum General Programming
    Replies: 5
    Last Post: 25th October 2007, 14:18
  3. Qcj Data classes initial release
    By croftj in forum Qt-based Software
    Replies: 0
    Last Post: 1st May 2007, 02:51
  4. Adding nonQt classes to QtApplication
    By codebehind in forum Newbie
    Replies: 11
    Last Post: 23rd April 2007, 21:08
  5. How to search a string in xml file with Qt Dom classes
    By doganay44 in forum Qt Programming
    Replies: 2
    Last Post: 5th October 2006, 20:16

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.