PDA

View Full Version : mode fullScreen



ederbs
19th January 2007, 21:35
Hello friends,

I am trying to use my screen in FullScreen in the taskbar, however I am trying the following one:

QObject::connect( fullSreenAction, SIGNAL( toggled(bool) ), this, SLOT( windowFullScreen(bool) ) );

void AcompanhamentoForm::windowFullScreen(bool setModeScreen)
{
if (setModeScreen)
QMainWindow::showFullScreen();
else
QMainWindow::showNormal();
}

More when clic in icon nothing does not happen, somebody could say what it is made a mistake.

Ederson de Moura

wysota
19th January 2007, 22:20
showFullScreen() is not a static method. The code above shouldn't even compile.

ederbs
19th January 2007, 22:30
yes compile.

My Class,

public slots:
virtual void windowFullScreen(bool);

the remaining portion is the code above.

wysota
19th January 2007, 23:07
It compiles by accident, but ok...

Could you post a minimal compilable example reproducing the problem? Does "fullSreenAction" (is there a spelling error?) get added to a toolbar?

EDIT: The attached project works fine for me. Maybe you forgot to make the action a toggle action?

ederbs
20th January 2007, 00:42
wysota,

The problem was here,

fullSreenAction->setToggleAction(true);

now it is working.

Thanks.