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. [SOLVED] How do I access the QTabBars present in QMdiArea after I set the view to tabbed?
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] How do I access the QTabBars present in QMdiArea after I set the view to tabbed?

Scheduled Pinned Locked Moved General and Desktop
qmdiareaqtabbar
5 Posts 3 Posters 2.4k 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.
  • P Offline
    P Offline
    Pranjal Jain
    wrote on 20 Aug 2015, 12:45 last edited by Pranjal Jain
    #1

    I need to put a tooltip for the QTabBars in QMdiArea and set their sizes fixed. How can I do that?

    A 1 Reply Last reply 20 Aug 2015, 20:38
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 20 Aug 2015, 13:23 last edited by mrjj
      #2

      HI and welcome
      Seems not to be a easy way to do it
      but you can dig out the bar using code

      http://stackoverflow.com/questions/16530952/use-custom-tab-bar-with-qmdiarea

      like

      QTabBar *Bar=ui->mdiArea->findChild<QTabBar*>();
      if (Bar) {
      Bar->setTabToolTip(0,"i won");
      }
      
      P 1 Reply Last reply 21 Aug 2015, 04:47
      1
      • P Pranjal Jain
        20 Aug 2015, 12:45

        I need to put a tooltip for the QTabBars in QMdiArea and set their sizes fixed. How can I do that?

        A Offline
        A Offline
        alex_malyu
        wrote on 20 Aug 2015, 20:38 last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • M mrjj
          20 Aug 2015, 13:23

          HI and welcome
          Seems not to be a easy way to do it
          but you can dig out the bar using code

          http://stackoverflow.com/questions/16530952/use-custom-tab-bar-with-qmdiarea

          like

          QTabBar *Bar=ui->mdiArea->findChild<QTabBar*>();
          if (Bar) {
          Bar->setTabToolTip(0,"i won");
          }
          
          P Offline
          P Offline
          Pranjal Jain
          wrote on 21 Aug 2015, 04:47 last edited by Pranjal Jain
          #4

          @mrjj : I tried this:

          I got the TabBar but I need to set a fixed width to all the tabs in that TabBar. How do I do that?

          M 1 Reply Last reply 21 Aug 2015, 06:32
          0
          • P Pranjal Jain
            21 Aug 2015, 04:47

            @mrjj : I tried this:

            I got the TabBar but I need to set a fixed width to all the tabs in that TabBar. How do I do that?

            M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 21 Aug 2015, 06:32 last edited by
            #5

            @Pranjal-Jain
            Not sure how one would do that from code directly but you can use stylesheet
            setStyleSheet("QTabBar::tab { height: 100px; width: 100px; }");
            and control it that way.

            1 Reply Last reply
            0

            1/5

            20 Aug 2015, 12:45

            • Login

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