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. How to implement an icon/pattern editor in QWidget?
Forum Updated to NodeBB v4.3 + New Features

How to implement an icon/pattern editor in QWidget?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.6k 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.
  • C Offline
    C Offline
    chbrandt
    wrote on 5 Sept 2012, 12:44 last edited by
    #1

    I want to implement an icon/pattern editor inside my application. I am thinking about a grid of pixels of size 10x10 (or something "grained" like so), and a pallette of colors to define each pixel. This "icon" (or more precisely, "pattern", because will be put size by size in a map) has low resolution because will be used as a graphical signature for low resolution vegetation maps. I am kind of lost here about how to implement this "low resolution" image editor.

    Does anybody has an idea here on how I could write that?

    I have no experience with graphical objects in Qt (and newbie in Qt, actually), and I've been reading about QPainter/QImage/QPixmap and even an example regarding ImageModel, but I didn't find the way yet...

    Thanks a lot in advance.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      broadpeak
      wrote on 5 Sept 2012, 12:52 last edited by
      #2

      Download this book:
      http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip
      (this book is free, source code of book is also downloadable)

      In the 5th chapter your will find a complete IconEditor app.

      1 Reply Last reply
      0
      • C Offline
        C Offline
        chbrandt
        wrote on 5 Sept 2012, 18:44 last edited by
        #3

        Thank you very much, broadpeak, for the information and the link! Great text! Problem solved ;)

        1 Reply Last reply
        0

        1/3

        5 Sept 2012, 12:44

        • Login

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