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 enter Images in a listWidget inside tabWidget
Forum Updated to NodeBB v4.3 + New Features

How to enter Images in a listWidget inside tabWidget

Scheduled Pinned Locked Moved Solved General and Desktop
26 Posts 6 Posters 7.8k Views 2 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.
  • O Offline
    O Offline
    Osama_Billah
    wrote on last edited by
    #21

    problem solved. thanks @SGaist @jsulm @anil_arise @JonB I just want to know that every beginner face these problems. or I'm the special one.

    jsulmJ 1 Reply Last reply
    0
    • O Offline
      O Offline
      Osama_Billah
      wrote on last edited by
      #22
              item1 = QtWidgets.QListWidgetItem(QIcon("path_to_pic"), "Name_of_pic")
              self.listWidget_2.addItem(item1)
              item2 = QtWidgets.QListWidgetItem(QIcon("path_to_pic"), "Name_of_pic!
              self.listWidget_2.addItem(item2)
      

      Capture.PNG

      1 Reply Last reply
      1
      • O Osama_Billah

        problem solved. thanks @SGaist @jsulm @anil_arise @JonB I just want to know that every beginner face these problems. or I'm the special one.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #23

        @Osama_Billah said in How to enter Images in a listWidget inside tabWidget:

        I just want to know that every beginner face these problems. or I'm the special one.

        At the beginning we are all beginners :-)

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        JonBJ 1 Reply Last reply
        1
        • J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #24

          Off topic replies forked to here:

          https://forum.qt.io/topic/111424/the-art-of-programming


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          1 Reply Last reply
          3
          • O Offline
            O Offline
            Osama_Billah
            wrote on last edited by
            #25

            Thanks for your response. One more thing how to convert these images horizontally and increase the size. @SGaist @jsulm @anil_arise @JonB

            1 Reply Last reply
            0
            • O Offline
              O Offline
              Osama_Billah
              wrote on last edited by Osama_Billah
              #26

              this is the code. I used QIcon the one @anil_arise suggest

              self.tabWidget.setIconSize(QtCore.QSize(32, 32))
              QtWidgets.QListWidgetItem.setLayoutDirection(QtCore.Qt.LeftToRight)
              
              
              
              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