Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. QMessageBox with a timeout
Forum Updated to NodeBB v4.3 + New Features

QMessageBox with a timeout

Scheduled Pinned Locked Moved Brainstorm
10 Posts 5 Posters 19.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    laurent bauer
    wrote on 5 Sept 2010, 12:10 last edited by
    #1

    Hello

    I like the message box of Outlook: When you receive a mail, a message box appears in the lower right corner. It remains visible a few seconds, becomes transparent and smoothly disappears after a while.

    This is a nice UI feature: you get informed but you aren't disturbed by the message (you don't have to click OK every minute).

    It would be nice to have the same feature in QMessageBox. (Just like what already exists with QStatusBar)

    @QMessageBox::information(this, tr(“New in 4.8”), tr(“Now, a QMessageBox can disappear after a timeout”), 2000);@

    I hope it can help

    Laurent

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Franzk
      wrote on 6 Sept 2010, 06:24 last edited by
      #2

      Of course you can mimic this using some construction like:

      @QMessageBox *mbox = new QMessageBox;
      mbox->setWindowTitle(tr("Title"));
      mbox->setText("Let this disappear automagically");
      mbox->show();
      QTimer::oneShot(2000, mbox, SLOT(hide()));@

      "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      1
      • Y Offline
        Y Offline
        Yash
        wrote on 6 Sept 2010, 15:53 last edited by
        #3

        Nice and simple Franzk

        http://kineticwing.com : Web IDE, QSS Editor
        http://speedovation.com : Development Lab

        1 Reply Last reply
        0
        • L Offline
          L Offline
          laurent bauer
          wrote on 6 Sept 2010, 16:43 last edited by
          #4

          Well, I've made something similar, with a QTimer piloting the windowOpacity property, so that the message box smoothly disappears.

          I like the result. Hence, it'd be nice to have it... a cuter Qt

          1 Reply Last reply
          0
          • ? This user is from outside of this forum
            ? This user is from outside of this forum
            Guest
            wrote on 6 Sept 2010, 16:46 last edited by
            #5

            laurent bauer wrote:

            bq. Well, I’ve made something similar, with a QTimer piloting the windowOpacity property, so that the message box smoothly disappears. I like the result.

            Great to hear it. You must post your code in the wiki "here":http://developer.qt.nokia.com/wiki/Category:snippets :)

            1 Reply Last reply
            0
            • S Offline
              S Offline
              sabrog
              wrote on 7 Sept 2010, 06:12 last edited by
              #6

              When i start work with Remote Desktop Client I starting hate animation effects in application. I think developers must add options when user can disable effects. Just keep it in mind.

              QT - Apple QuickTime
              Qt - Nokia's Qt Development Frameworks
              Apple is a competitor of Nokia, so QT != Qt

              1 Reply Last reply
              0
              • F Offline
                F Offline
                Franzk
                wrote on 7 Sept 2010, 08:13 last edited by
                #7

                [quote author="SABROG" date="1283839928"]When i start work with Remote Desktop Client I starting hate animation effects in application. I think developers must add options when user can disable effects. [/quote]

                I agree. I think that in general people try to make their applications too fancy. Fancy is good as long as it improves the tasks you support or improve the user interface. The ability to switch off eye candy is a good trade off as far as I'm concerned.

                "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

                http://www.catb.org/~esr/faqs/smart-questions.html

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  laurent bauer
                  wrote on 7 Sept 2010, 21:35 last edited by
                  #8

                  I agree somehow. However... A tool and its usage are two different things.

                  Take an axe. One would cut wood to heat its family home, another one would cut its family with it ;o) . Is the axe responsible? No, it's the usage made of it.

                  I remember when VGA appeared, all the ugly colored applications that were imagined. "Long life black & white!". Fortunately color survived.

                  Don't kill animations too quick... (or kill quick... ;o) )

                  1 Reply Last reply
                  0
                  • ? This user is from outside of this forum
                    ? This user is from outside of this forum
                    Guest
                    wrote on 8 Sept 2010, 01:56 last edited by
                    #9

                    [quote author="laurent bauer" date="1283895325"]laurent bauer wrote:
                    Don't kill animations too quick... (or kill quick... ;o) )
                    [/quote]

                    when I saw it for the first time in Qt, I loved the animations which were available for the basic qt widgets (e.g. tree expanding/collapsing) .. never felt like I'm loosing on performance or response time

                    1 Reply Last reply
                    0
                    • X Offline
                      X Offline
                      xsacha
                      wrote on 5 Dec 2010, 06:40 last edited by
                      #10

                      Yes, in fact they hide when performance is sub-optimal.

                      I read this thread a long time ago (before I was registered on here) and implemented it using Qt4.7.
                      There's a workaround, involving adding a timer (first reply shows how to do it).

                      It works quite well as a notification for loading files/images and such. I really wish more developers used it -- especially on Windows/Symbian where you get annoyed by boxes all the time.

                      • Sacha
                      1 Reply Last reply
                      1

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved