Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Color picker?
Forum Updated to NodeBB v4.3 + New Features

Color picker?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 2 Posters 8.5k 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.
  • K Offline
    K Offline
    kgregory
    wrote on last edited by
    #1

    I'm looking for a color picker widget or dialog in QT quick. Does that exist already?

    If not, any suggestions on how to create one? I'm thinking a square or round mouse area with a color tile. When the user clicks anywhere, it detects the location and passes the corresponding color to the underlying object code. The hard part will be getting the color that is passed to match up well with the location of the click.

    JKSHJ 1 Reply Last reply
    0
    • K kgregory

      I'm looking for a color picker widget or dialog in QT quick. Does that exist already?

      If not, any suggestions on how to create one? I'm thinking a square or round mouse area with a color tile. When the user clicks anywhere, it detects the location and passes the corresponding color to the underlying object code. The hard part will be getting the color that is passed to match up well with the location of the click.

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      @kgregory said in Color picker?:

      I'm looking for a color picker widget or dialog in QT quick. Does that exist already?

      Yes.

      • Widgets: http://doc.qt.io/qt-5/qcolordialog.html
      • Qt Quick: http://doc.qt.io/qt-5/qml-qtquick-dialogs-colordialog.html

      Tip: I found these by Googling "color picker" in the Qt documentation

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      1
      • K Offline
        K Offline
        kgregory
        wrote on last edited by
        #3

        I'm sorry, I guess a dialog is actually not what I really want. I'm looking for a control that stays active on the screen so the user can change colors at any time.

        JKSHJ 1 Reply Last reply
        0
        • K kgregory

          I'm sorry, I guess a dialog is actually not what I really want. I'm looking for a control that stays active on the screen so the user can change colors at any time.

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @kgregory said in Color picker?:

          I guess a dialog is actually not what I really want. I'm looking for a control that stays active on the screen so the user can change colors at any time.

          If using Qt Widgets, you could try using the QColorDialog::NoButtons option, to make a QColorDialog that never closes.

          For Qt Quick, you could copy and modify the code from DefaultColorDialog.qml: http://code.qt.io/cgit/qt/qtquickcontrols.git/tree/src/dialogs/DefaultColorDialog.qml

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kgregory
            wrote on last edited by
            #5

            I may have to do that. I hate this color dialog in quick. It gets the job done though, so I guess I'll keep it while I develop the rest of the app.

            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