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. [Solve] Create vertical QLable

[Solve] Create vertical QLable

Scheduled Pinned Locked Moved General and Desktop
11 Posts 3 Posters 3.2k Views
  • 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.
  • H Offline
    H Offline
    Hareen Laks
    wrote on last edited by
    #1

    Hi all,

    As appears in "this image":http://postimg.org/image/nxyg4av0f/ I need to add a QTableView and two QLables to a UI.

    I already created QTableView but my problem is I don't know how to create a vertical QLable (highlighted one).

    Can anybody please help me?

    Thanks for reading..

    P.S. : is there any problem with submit post here? I tried three times. Post dissapeared when I press 'Submit Post' button.

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      Zarkon
      wrote on last edited by
      #2

      I would simply take the easy way out and put a picture in a pushbutton, but there must be other ways too.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        There are many 3rd party components that can make rotated labels, and many samples that show it. Did you try using your Google-foo?

        1 Reply Last reply
        0
        • H Offline
          H Offline
          Hareen Laks
          wrote on last edited by
          #4

          Zarkon,

          Pushbutton??

          Andre,
          I read lot. But lot of guys said have to create a customized lable from QLable.

          For example "here":http://stackoverflow.com/questions/9183050/vertical-qlabel-or-the-equivalent.

          But I'm finding easy way. :)

          Thanks both of you for replying me.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #5

            OMG... What could be easier than the ready-made code handed to you on that SE link? How easy do you want it?

            1 Reply Last reply
            0
            • Z Offline
              Z Offline
              Zarkon
              wrote on last edited by
              #6

              I also found that link on stack overflow. You can do a lot with coding, but sometimes it is not necessary. I have used sometimes pushbuttons (without slot and text) and just added a picture to it. No coding required.

              1 Reply Last reply
              0
              • H Offline
                H Offline
                Hareen Laks
                wrote on last edited by
                #7

                Andre,

                :D

                Yeah. Actually it is easier to copy and paste the ready-made code. But I hope some method to change the properties of existing QLable.

                I felt some uncomfortable to write a new class to do very simple thing like that.
                Should I create a new class for a simple decorative thing which only work as a decoration to a project and not is an essential thing?

                Need some advice from expert.

                Thank you..

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andre
                  wrote on last edited by
                  #8

                  There is no property on QLabel that will do it for you. Either use what has been handed to you, or give up the idea. And no, it is obviously not essential. Whole generations of Qt developers have managed to build very cool applications without having this feature in QLabel.

                  And if you note the logo under my picture, I am an expert.

                  1 Reply Last reply
                  0
                  • H Offline
                    H Offline
                    Hareen Laks
                    wrote on last edited by
                    #9

                    @ Zarkon,

                    Should I disabled the pushbutton?

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      Hareen Laks
                      wrote on last edited by
                      #10

                      [quote author="Andre" date="1399456811"]And if you note the logo under my picture, I am an expert. [/quote]

                      Yes. I saw it. Because of that I said 'Need some advice from expert'. I mean you. :)

                      Thank you very much for support.

                      1 Reply Last reply
                      0
                      • H Offline
                        H Offline
                        Hareen Laks
                        wrote on last edited by
                        #11

                        Thanks all. I "this link":http://stackoverflow.com/questions/9183050/vertical-qlabel-or-the-equivalent help me to successfully create vertical Qlable.

                        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