PDA

View Full Version : QSS File Changing MainWindow size from Fullscreen to a small size



Ion
9th December 2014, 17:30
Quick question I have a QSS file that i use to set the style and this works great. However I seem to be getting a weird problem.

When I launch the program I tell it to start in fullscreen but instead the program launches as a small window the code is


GUIForm lGUIForm(aFullscreen, fOwner,aConfiguration);

if (aFullscreen)
{
lGUIForm.showMaximized();
}
else
{
lGUIForm.show();
}
Below is my stylesheet


QDialog
{
background-color: #3A3A53;
font-family: "DejaVu Sans";
}

#MAINFRM
{
background-color: #3A3A53;
font-family: "DejaVu Sans";
}

#HEADER
{
background-color: rgb(12, 12, 40);
color: rgb(255, 255, 255);
font-family: "DejaVu Sans";
}

#MENUBAR
{
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffffff, stop: 1 #c2c2d4);
}

#FILTERBAR
{
background-color: rgb(58, 58, 83);
}

#VIDEOFRM
{
background-color: rgb(0, 0, 0);
}

#ALARMBAR
{
background-color: rgb(35, 35, 61);
color: rgb(255, 255, 255);
}


#MSGBOX
{
background-color: #141428;
font-family: "DejaVu Sans";
color: #D9D9EA;
border: 0px solid #9595A9;
padding: 0 10px 0 10px;
}

#IndicationPanel
{
font-family: "DejaVu Sans" ;
background-color: #3C3C79 ;
border-color: #67677E ;
color: #67677E ;
border-style: solid ;
border-width: 2px ;
border-radius: 4px ;
}

QLabel
{
background-color: #3A3A53;
font-family: "DejaVu Sans";
color: #D9D9EA;
}

QPushButton:hover:pressed{
font-family: "DejaVu Sans";
background-color: #3F3FB3 ;
border-color: #F0F0FF ;
color: #F0F0FF ;
border-style: solid;
border-width: 2px;
border-radius: 4px;
}
QPushButton:hover:!pressed {
font-family: "DejaVu Sans";
background-color: #D9D9EA ;
border-color: #000000 ;
color: #3A3A53 ;
border-style: solid;
border-width: 2px;
border-radius: 4px;
}
QPushButton:!hover {
font-family: "DejaVu Sans";
background-color: #D9D9EA ;
border-color: #000000 ;
color: #3A3A3A ;
border-style: solid;
border-width: 2px;
border-radius: 4px;
}
QPushButton:disabled{
background-color: #9595A9;
border-color: #67677E;
color: #67677E;
font-family: "DejaVu Sans";
border-style: solid;
}
QPushButton:disabled:pressed{
background-color: #3C3C79;
border-color: #67677E;
color: #67677E;
font-family: "DejaVu Sans";
border-style: solid;
}
The weird thing is I know it’s to do with the stylesheet as if i stop it from being loaded the program launches in fullscreen. Has anyone seen this or have any solution how to solve this that would be great.