Qtabbar on the main window title bar like in crome, firefox 4 or IE9
hi every body, iam writing a small web browser, and i will like to know how to implement a qtabwidget with the tab bar right in the window title bar, just like google chrome firefox4 or IE9, please help!
Re: Qtabbar on the main window title bar like in crome, firefox 4 or IE9
for windows Vista and above you can use the new windows api, but ofcourse it will not work on WinXP and linux. Other way is to write your own custom skin by using Qt::FrameLessWindowHint
Re: Qtabbar on the main window title bar like in crome, firefox 4 or IE9
i can guess going into that windows api will not be as chocolate like Qt is! i also saw your class, http://qt-apps.org/content/show.php?content=138161 , is it possible using it to implement such a title bar, or similar?
Re: Qtabbar on the main window title bar like in crome, firefox 4 or IE9
yes it is possible.. use the setContentsMargin() function of the class to increase the area at the top, and do some custom painting to look like a title bar. I may implement a full function like that in future :)
Re: Qtabbar on the main window title bar like in crome, firefox 4 or IE9
i did not find the setContentsMargin() function in the header file of your file, also this is what i did
Code:
int main(int argc, char *argv[])
{
MainPage *fenetre=new MainPage;
NcFramelessHelper *frame = new NcFramelessHelper;
frame->activateOn( fenetre );
return app.exec();
}
what i get is just a windows tha i cannot resize, with the default windows7 title bar, i event compiled the example, same thing, no customm title bar as i can see in the prview here http://qt-apps.org/CONTENT/content-m2/m138161-2.png
please help! iam also impatient that you implement that function
Re: Qtabbar on the main window title bar like in crome, firefox 4 or IE9
Quote:
Originally Posted by
wambagilles
i did not find the setContentsMargin() function in the header file of your file,
yes.. i half implemented that function and later did not got time time to complete it. As i have not worked on it for quite some time
now, i was under impression that its already there.
Quote:
Code:
MainPage *fenetre=new MainPage;
NcFramelessHelper *frame = new NcFramelessHelper;
frame->activateOn( fenetre );
what i get is just a windows tha i cannot resize, with the default windows7 title bar, i event compiled the example, same thing, no customm title bar as i can see in the prview here
http://qt-apps.org/CONTENT/content-m2/m138161-2.png
please help! iam also impatient that you implement that function
it should work, i have just tested it on ubuntu. I dont have Win7 rite now so i can test it on that. But i had tested it on Windows before and it seem to work well.
What does the status functions like widgetMovable() returns? And do you set any other flags inside your MainPage?
Re: Qtabbar on the main window title bar like in crome, firefox 4 or IE9
sorry which functions?
anyway, i am waiting impatiently that you implement that!