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. QSpinBox without QLineEdit (only arrows)
Forum Updated to NodeBB v4.3 + New Features

QSpinBox without QLineEdit (only arrows)

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 4.9k 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.
  • D Offline
    D Offline
    DerekDomino
    wrote on last edited by
    #1

    Hello,

    Is it possible to hide/remove the QLineEdit that is shipped with a QSpinBox so that we are left only with the up/down arrows or plus/minus buttons?

    It seems possible to make the QLineEdit read only (via QAbstractSpinBox) but not to remove it.

    Thanks

    1 Reply Last reply
    0
    • A Offline
      A Offline
      absfrm
      wrote on last edited by
      #2

      in gui programming, SpinBox is a control that has up/down key with textbox and you can change the value of textbox with keys.
      but if you want to do this,it's better to design your own control.it's easy.

      If You Want You Can!

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DerekDomino
        wrote on last edited by
        #3

        Hi Abbas,

        Thanks for your reply. The advantage would be to not recode all the behaviour of the widget. I would then just have to connect my slots to the Qt widget's signals.

        In fact I tried to do my own replacement with just two buttons (QPushButton or QToolButton) and then set a "plus" and "minus" icon/background image for these buttons but I'm experiencing problems with the clickable area:

        http://qt-project.org/forums/viewthread/19846/

        1 Reply Last reply
        0
        • A Offline
          A Offline
          absfrm
          wrote on last edited by
          #4

          OK . I'm going to answer it soon. :)

          If You Want You Can!

          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