-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <QWidgetAction>
#include <QLinearGradient>
#include <QAbstractTextDocumentLayout>
-#include <QTimer>
/*!
\class QtxMenu::Title
removeTitle();
insertTitle();
}
-
-/*!
- \brief Paint event
-*/
-void QtxMenu::paintEvent( QPaintEvent* e )
-{
- // Force menu resizing, see resizeAfterRepaint().
- QMenu::paintEvent(e);
- QTimer::singleShot( 0, this, SLOT( resizeAfterRepaint() ) );
-}
-
-void QtxMenu::resizeAfterRepaint()
-{
- // this slot is used as a workaround about annoying problem
- // on some X window System desktops like KDE 5, Unity and other
- // that causes setting incorrect menu's geometry
- // after it appears on a screen.
- resize( sizeHint() );
-}