View Full Version : Problems with showMaximize()
drow.it
26th January 2010, 05:29
I hide window title:
cMainWindow::cMainWindow( QWidget* parent /*= 0*/ )
: QMainWindow(parent, Qt::CustomizeWindowHint),
{
}
and I have slot to maximize/showNormal the window
void cMainWindow::toggleMaximize()
{
isMaximized() ? showNormal() : showMaximized();
}
While I maximize window it overlapped taskbar as if I use showFullScreen()
How to solve this problem?
high_flyer
26th January 2010, 09:27
How to solve this problem?
What problem?
drow.it
26th January 2010, 09:31
I need only maximize window without title. but it become fullScreen insted of maximize
high_flyer
26th January 2010, 11:00
Try using Qt::FramelessWindowHint.
drow.it
26th January 2010, 11:03
I have tried. But with the same result
high_flyer
26th January 2010, 11:06
Did you ADD FramelessWindowHint to your previous code, or did you use FramelessWindowHint INSTEAD the Qt::CustomizeWindowHint?
drow.it
26th January 2010, 11:15
I tried both alternatives. But with the same result. Besides with FramelessWindowHint I can not change window size with mouse and I have to realise changing window size in my code
ps. Sorry for my bad english :)
vishwajeet.dusane
26th January 2010, 12:25
Hi
Try this.
1. QDesktopWidget * QApplication::desktop ()
2. QDesktopWidget::availableGeometry which will give you available size of your desktop
3. QWidget::setMaximumSize to set maximum size of your titile less widget
4. call showMaximized()
This will ensure that your maximized widget will not cover full screen .
drow.it
26th January 2010, 12:32
Thanks. Now all work correctly.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.