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. I want to change the position of Text on QCheckBox bottom.

I want to change the position of Text on QCheckBox bottom.

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 810 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.
  • K Offline
    K Offline
    keyboard_hellchang
    wrote on last edited by
    #1

    Hi!

    My QT version is 4.8.7.
    My OS is CentOS7.

    I want to change the position of Text on QCheckBox bottom.

    example)
    ㅁ CheckBox

    -> i want ->

    ㅁ
    CheckBox

    Please Help me!

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      Well you can get
      alt text

      by simply inserting a \n in front of the text.

      but if you want them aligned then you must subclass and draw it yourself.

      You might be able to use a QProxyStyle and the SE_CheckBoxContents but I recall on window
      the FusionStyle didn't ask for it, making it a no-go.

      A maybe far easier way is simply to have no text on the check box and then place it with a QLable in a layout
      to give same effect.

      alt text

      alt text

      K 1 Reply Last reply
      3
      • mrjjM mrjj

        Hi
        Well you can get
        alt text

        by simply inserting a \n in front of the text.

        but if you want them aligned then you must subclass and draw it yourself.

        You might be able to use a QProxyStyle and the SE_CheckBoxContents but I recall on window
        the FusionStyle didn't ask for it, making it a no-go.

        A maybe far easier way is simply to have no text on the check box and then place it with a QLable in a layout
        to give same effect.

        alt text

        alt text

        K Offline
        K Offline
        keyboard_hellchang
        wrote on last edited by
        #3

        @mrjj
        ohhhhhhhhhhhhhh!!!!!
        thank you champion!!!!!
        I used QCheckBox and QLabel as a Vertical Layout to solve it.

        very thank you so much!!!!!!

        1 Reply Last reply
        1

        • Login

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