Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    How to write descriptions for elements in the interface window

    General and Desktop
    2
    6
    1800
    Loading More Posts
    • 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
      mariusmssj last edited by

      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 Reply Quote 0
      • T
        TheDestroyer last edited by

        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 Reply Quote 0
        • M
          mariusmssj last edited by

          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 Reply Quote 0
          • T
            TheDestroyer last edited by

            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 Reply Quote 0
            • ?
              Guest last edited by

              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 Reply Quote 0
              • M
                mariusmssj last edited by

                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 Reply Quote 0
                • First post
                  Last post