[Solve] Create vertical QLable
-
wrote on 7 May 2014, 04:56 last edited by
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.
-
wrote on 7 May 2014, 06:48 last edited by
I would simply take the easy way out and put a picture in a pushbutton, but there must be other ways too.
-
wrote on 7 May 2014, 07:04 last edited by
There are many 3rd party components that can make rotated labels, and many samples that show it. Did you try using your Google-foo?
-
wrote on 7 May 2014, 09:15 last edited by
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.
-
wrote on 7 May 2014, 09:17 last edited by
OMG... What could be easier than the ready-made code handed to you on that SE link? How easy do you want it?
-
wrote on 7 May 2014, 09:35 last edited by
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.
-
wrote on 7 May 2014, 09:49 last edited by
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..
-
wrote on 7 May 2014, 10:00 last edited by
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.
-
wrote on 7 May 2014, 10:14 last edited by
@ Zarkon,
Should I disabled the pushbutton?
-
wrote on 7 May 2014, 10:18 last edited by
[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.
-
wrote on 27 May 2014, 07:56 last edited by
Thanks all. I "this link":http://stackoverflow.com/questions/9183050/vertical-qlabel-or-the-equivalent help me to successfully create vertical Qlable.