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.
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.
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?
no you can't.only for open source software, please.
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
i dont know. on my system everything wotks well, try this test-code for buttons:
the application should only close if you click on the "X"-Button. and i don't us grabMouse... could you post a snippet of your code or are you using my test-application?Qt Code:
#include <QtGui> #include "../QSkinWindows/QSkinWidget.h" #include "../QSkinWindows/QSkinMainWindow.h" int main(int argc, char* argv[]) { a.setStyle("plastique"); QSkinWidget *wid = new QSkinWidget(); wid->setWindowTitle("QSkinWidget"); g->addWidget(pb); wid->setLayout(g); wid->show(); QSkinMainWindow *mw = new QSkinMainWindow(); QWidget centralWidget; mw->setWindowTitle("QSkinMainWindow"); g2->addWidget(pb2); centralWidget.setLayout(g2); mw->setCentralWidget(¢ralWidget); mw->show(); return a.exec(); }To copy to clipboard, switch view to plain text mode
rvega (11th May 2012)
hey, back with something great:
The skin-classes with argb support on windows. no faking, and no cpu overhead.
atm the classes are ONLY FOR WINDOWS, for linux use the old ones, i will fix this and add argb support for linux, too.
have fun.
all happy with this? nothing i could make better?
if there are any people who are great in designing could make same skins. that would be great.
Excellent idea! Congratulations!
This comes to prove that you don´t need vista OS to make well finished windows, Qt on windows 2000 is plenty enough.
Now that it is implemented i have a few ideas...
************************************************** *********
Why do you include <window.h> when there is an implemented <qt_windows.h> for those functions?
see this example from russia:
link: http://www.opennet.ru/docs/RUS/qt3_prog/c7922.html
#define _WIN32_WINNT 0x0501
#include <qapplication.h>
#include <qt_windows.h> // <----- ********** here**********
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello Qt!", 0);
app.setMainWidget(label);
int exstyle = GetWindowLong(label->winId(), GWL_EXSTYLE);
exstyle |= WS_EX_LAYERED;
SetWindowLong(label->winId(), GWL_EXSTYLE, exstyle);
SetLayeredWindowAttributes(label->winId(), 0, 128,
LWA_ALPHA);
label->show();
return app.exec();
}
*******************************************
isn´t it better to use qt_windows header? or more compatible maybe......
i think the behavior of the skinned windows can be improved.
the problem with resizing is the following:
the mouse switches to resize mode far from the apparent window border right at the end of the surrounding shadow which makes difficult to resize it.
i think that the resizing could be bette is instead of this, resizing mouse icon could appear in the thin white border around the cyan dialog, or at least ther should be a value to extend the resizing area some pixels more inside the frame.
in my opinion picking on the outside outer shadow limit for resizing is not the better behavior.
the white border with rounded corners is very nice and there should be some way of making it thicker so it can be used for resizing.
************************************************** ******
also the mouse is switching only to vertical and horizontal icons for resizing, when it´s pointed to a corner, it doesn´t properly switch to diagonal resizing icons.
as an example i made a graphical explanation
the attachment shows the skinned windows against a sample notepad/windows background
Last edited by wysota; 27th September 2007 at 20:38.
i just came with an idea for a theme with thicker borders and no shadow, tell me what you think.
perhaps a complex task is simulating 3d border frames, the only way i have achieved this was using predefined png bitmaps inserting them in the style of a button but those are usefull for rounded rectangle shapes only.
see attached
i´ve just noticed that in the skinned (close, minimize, maximize) window the buttons are not real QButton objetcs.
they are pixmaps, so they don´t have the same behavior of a button. (change appearance when clicked).
is it possible to replace those pixmaps with real QButton widgets to add basic button behavior to them? ( i suppose it´s possible because you´re operating inside an invisible frame widget)
is it possible to create an example that uses a custom made form with form designer?
how can i pick up an *.ui file and merge it with the skinned window?
the starting point could be assuming in form designer thet it would have no parent frame.
i think it could start with a qframe transparent object.
then, inside this qframe there would be two frames, one for the title bar and its buttons (necessary because this ui form would be set with a framelesswindowhint atribute) and a content frame under the titlebar.
see this interesting example on how to remove windows titebar and using your own custom made titlebar widget in qt. (it basicaly does the aproach mentioned above)
"How can I handle events in the titlebar and change its color etc ?"
http://trolltech.com/developer/knowl...25.2011048382/
(this example uses real qbutton objects for the titlebar)
best regards
Last edited by wysota; 28th September 2007 at 00:09. Reason: Posts merged. Please edit your original post instead of posting again next time
ok, here it goes
i´ve just created a test form UI with title bar.
How can i use this linked to the skin lib? (making the yellow to pink gradient transparent)
see attached
(to load correctly the zip files should be created in c:\customform folder)
(strange bug loading styles)
************************************************** **************
just noticed another inprovement.
when the maximize button is clicked the application doesn´t really maximizes to the fullest.
IMO when maximizing the window should have the shadow removed so it can maximize just on the limit of the thin white border with rounded corners.
************************************************** **************
one of the few examples in qt is the shaped clock example.
in this example qt presents one of it´s weak points, because when it deals with masks, those masks are black and white only. (no alpha mask with the setmask command)
this results in god finishing inside the application but bad finishing with applications that are different than the "typical" rectangle.
is it possible to make an example using the lib for the shapedclock where the outer border is antialiased? or maybe even better... showing just the tick marks and the pointers without the grey background.
see image attached
Last edited by jacek; 28th September 2007 at 12:23. Reason: merged three posts
okokokok.....
WOOOOW!
1. the problem with resizing is because of the shadow. if you don't have any shadow you can even resize at the corners.
2. you can use all skins you want to they only have to be applied in the skin.dat file.
3.i don't want to use real buttons, because the user of the class shouldn't have access to them only through the skin.dat file. But the problem with no hover and press actions i will fix.
4. For picking up a ui File handle it like in normal Widgets. Sublcass QSkinWidget and subclass from your Form :
5.I think you don't need a designer plugin. You just have to Subclass your form from QSkinWidget instead of QWidget and the skin is applied. wherefore a designer plugin?Qt Code:
class MyWidget : public QSkinWidget, public Ui::myFormTo copy to clipboard, switch view to plain text mode
6.maximize is the sam problem with shadow.
7. For the shaped clock try my Argb-Widget in the Wiki. The skin classes are only for real applications that should have borders.
PS: pls send me emails^^ it's pain to read all this in the forum....
markus.kuenkler@gmx.de
Bookmarks