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. Regarding QPushButton
Qt 6.11 is out! See what's new in the release blog

Regarding QPushButton

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.7k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello, i have started developing in QT a few months ago since my project is based on it. I have problem regarding QPushButton. I want to set title of my button in vertical manner rather than default horizontally. Please help me.

    1 Reply Last reply
    0
    • D Offline
      D Offline
      d2uriel
      wrote on last edited by
      #2

      "First":http://developer.qt.nokia.com/forums/viewthread/9502 link and "second":http://www.qtcentre.org/wiki/index.php?title=OrientationButton link.

      As stated above, you have to derive from QPushButton and make your own class with re-implemented paintEvent() fitted to your needs.

      "Do not judge, and you will never be mistaken." - Jean-Jacques Rousseau

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

        The normal QPushButton does not support that. There are ways around that though:

        use libQxt. It has a class QxtPushButton that can do what you want

        subclass QPushButton and reimplement the paint event so you can render the text yourself

        Put the rotated text on an image, and set the image on the push button.

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          thanks d2uriel and Andre for your suggestions. i think that second option given by both Andre and d2uriel is the answer to my case because i don't want to rely on the third party::"QxtGUI".

          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