VirtualBox

Changeset 35516 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jan 13, 2011 9:42:47 AM (14 years ago)
Author:
vboxsync
Message:

FE/Qt4: No busy cursor on Mac OS X. Use a busy cursor instead of the wait
cursor when the operation could be canceled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIProgressDialog.cpp

    r34479 r35516  
    5151                                   int cMinDuration /* = 2000 */,
    5252                                   QWidget *pParent /* = 0 */)
    53 //  : QIDialog(aParent, Qt::Sheet | Qt::MSWindowsFixedSizeDialogHint | Qt::WindowTitleHint)
    5453  : QIDialog(pParent, Qt::MSWindowsFixedSizeDialogHint | Qt::WindowTitleHint)
    5554  , m_progress(progress)
     
    152151        int id = startTimer(cRefreshInterval);
    153152
    154         /* Set busy cursor */
    155         QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
     153        /* Set busy cursor.
     154         * We don't do this on the Mac, cause regarding the design rules of
     155         * Apple there is no busy window behavior. A window should always be
     156         * responsive and is it in our case (We show the progress dialog bar). */
     157#ifndef Q_WS_MAC
     158        if (m_fCancelEnabled)
     159            QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
     160        else
     161            QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
     162#endif /* Q_WS_MAC */
    156163
    157164        /* Enter the modal loop, but don't show the window immediately */
     
    161168        killTimer(id);
    162169
     170#ifndef Q_WS_MAC
     171        /* Reset the busy cursor */
    163172        QApplication::restoreOverrideCursor();
     173#endif /* Q_WS_MAC */
    164174
    165175        return result();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette