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. How to write descriptions for elements in the interface window
Forum Updated to NodeBB v4.3 + New Features

How to write descriptions for elements in the interface window

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 2.1k 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.
  • M Offline
    M Offline
    mariusmssj
    wrote on last edited by
    #1

    Hi guys,

    On my interface window i got drop down lists, radio boxes and all sorts of thigs. And i want to write some descriptions for the user explaining what each element does. Is it possible to write descriptions for them once you move your mouse over them a description buble would come up to explain what it does?

    Thanks

    1 Reply Last reply
    0
    • T Offline
      T Offline
      TheDestroyer
      wrote on last edited by
      #2

      There's a member function in all QWidget controls called setToolTip(QString ...).
      @
      QPushButton *button = new QPushButton;
      button.setToolTip("If you click this button, the doors of heaven will open for you");
      @

      Cheers :)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mariusmssj
        wrote on last edited by
        #3

        A thousand thank you's :D it worked like a dream, i got another question if you don't mind, how would you do the same thing for a each tab in a tab-widget? i mean write description for each separate tab?

        1 Reply Last reply
        0
        • T Offline
          T Offline
          TheDestroyer
          wrote on last edited by
          #4

          If there would be a way, it would be the same. Just use setToolTip on the QTabWidget object you have. I think you have to point your mouse on the top of your QTabWidget, where you select the tabs.

          1 Reply Last reply
          0
          • ? This user is from outside of this forum
            ? This user is from outside of this forum
            Guest
            wrote on last edited by
            #5

            Tooltip is one solution, you can also put the description text on mouse over in the main window status bar, it is a common and a little less intrusive approach.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mariusmssj
              wrote on last edited by
              #6

              Thanks guys :D it worked.
              Btw I am making an openGL teaching tool and I am not a super creative person, would any of you be interested in testing my interface once I got it up and running?

              I would love to get some feedback to see if I am doing an ok job.

              Thanks for all of your help =]

              1 Reply Last reply
              0

              • Login

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