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. Qt Designproblem with QtableWidget
Qt 6.11 is out! See what's new in the release blog

Qt Designproblem with QtableWidget

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

    Hello,

    An the Moment, I programming a Little Mapeditor vor my 2D-RPG game.
    All functions are successfoul implementated to my Mapeditor, but the disign
    of the QtableWidget is for my opinion very bad.

    I would, that the textures in each cell are full streched. But actually the textures aren't streched.
    Here is a little picture, where i can show you this.
    http://s14.directupload.net/images/131231/acqnwyss.png

    How can I change the settings in the QtableWidget, that all textures in each cell are streched?

    1 Reply Last reply
    0
    • p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi,

      Try setting the sizehint using "setSizeHint":http://qt-project.org/doc/qt-5.0/qtwidgets/qtablewidgetitem.html#setSizeHint to that of the cell size.

      157

      1 Reply Last reply
      0
      • R Offline
        R Offline
        repac3r
        wrote on last edited by
        #3

        Okay I have set the cell size to 32x32, its the size of the textures.
        I think, that I have taken a wrong way to load textures in a cell.
        Actually I load the textures over the iconSet function, is this the right way, or exists a better methode to load images in a cell ?

        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