Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. What is "statusHint" ?
Forum Updated to NodeBB v4.3 + New Features

What is "statusHint" ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 427 Views 2 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    Found this info, now asking what is "statusHint" ?
    C++ code example would be nice .

    QStatusBar

    The QStatusBar class provides a horizontal bar suitable for presenting status information, for example a can be hint:

    statusBar()->showMessage("Ready");

    This snippet will show the message- "Ready" on status bar. You can set property statusHint in any widget.

    Christian EhrlicherC 1 Reply Last reply
    0
    • A Anonymous_Banned275

      Found this info, now asking what is "statusHint" ?
      C++ code example would be nice .

      QStatusBar

      The QStatusBar class provides a horizontal bar suitable for presenting status information, for example a can be hint:

      statusBar()->showMessage("Ready");

      This snippet will show the message- "Ready" on status bar. You can set property statusHint in any widget.

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @AnneRanch said in What is "statusHint" ?:

      You can set property statusHint in any widget.

      Where in the documentation is this stated?

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • Chris KawaC Offline
        Chris KawaC Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on last edited by Chris Kawa
        #3

        I don't know where this info is from, but I think it was supposed to be statusTip, not statusHint (tip and hint mean the same thing).
        It's a string that you can set on any widget. If you place that widget in something with status bar and hover the mouse over it you will see that text on the status bar;

        Example C++ code:

        int main(int argc, char *argv[])
        {    
            QApplication a(argc, argv);
        
            QMainWindow mainWindow;
            QStatusBar* statusBar = new QStatusBar();
            QTextEdit*  someWidget = new QTextEdit();
            someWidget->setStatusTip("Hello, I'm an example status tip.");
        
            mainWindow.setStatusBar(statusBar);
            mainWindow.setCentralWidget(someWidget);
            mainWindow.show();
        
            return a.exec();
        }
        
        1 Reply Last reply
        2
        • A Offline
          A Offline
          Anonymous_Banned275
          wrote on last edited by
          #4

          After more checking - the example is mixing "tool tip" with something which does not exist.
          I am using two ways to verify the "status bar" - "setstatusTip " and "showMessage".

          Chris KawaC 1 Reply Last reply
          0
          • A Anonymous_Banned275

            After more checking - the example is mixing "tool tip" with something which does not exist.
            I am using two ways to verify the "status bar" - "setstatusTip " and "showMessage".

            Chris KawaC Offline
            Chris KawaC Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @AnneRanch Those are 3 different functionalities. Tool tip is a popup text that shows over a widget when you hover over it. Status tip is a similar thing, but instead of a popup it shows on a status bar when widget is a child of QMainWindow that has status bar. showMessage is an on demand way to show an arbitrary text on the status bar whenever you want.

            1 Reply Last reply
            3

            • Login

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