Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    SpinBox with QStrings in values.Is it possible?

    General and Desktop
    4
    6
    1421
    Loading More Posts
    • 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.
    • S
      Simplevolk last edited by

      Hello!
      Can i create a SpinBox with QStrings in values?
      Or if not- have Qt another component to do that?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Something like "this":http://libqxt.bitbucket.org/doc/0.6/qxtstringspinbox.html ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • raven-worx
          raven-worx Moderators last edited by

          you can also easily subclass the widget and reimplement "QSpinBox::textFromValue()":http://qt-project.org/doc/qt-4.8/qspinbox.html#textFromValue

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply Reply Quote 0
          • jazzycamel
            jazzycamel last edited by

            Another option is "QwwTextSpinBox":http://www.wysota.eu.org/wwwidgets/doc/html/qwwtextspinbox.html from the wwWidgets widget set by Witold Wysota.

            For the avoidance of doubt:

            1. All my code samples (C++ or Python) are tested before posting
            2. As of 23/03/20, my Python code is formatted to PEP-8 standards using black from the PSF (https://github.com/psf/black)
            1 Reply Last reply Reply Quote 0
            • S
              Simplevolk last edited by

              [quote author="SGaist" date="1366034843"]Hi,

              Something like "this":http://libqxt.bitbucket.org/doc/0.6/qxtstringspinbox.html ?[/quote]

              Yes,somthing like this.And as i see it is foreign component?
              Is it not included as standard?

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                Yes, it's from libqxt (really easy to build and use)

                No, it's not

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post