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. QTablewidget insert check box and do alot
Forum Updated to NodeBB v4.3 + New Features

QTablewidget insert check box and do alot

Scheduled Pinned Locked Moved Unsolved General and Desktop
24 Posts 4 Posters 4.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.
  • mrjjM mrjj

    @ManiRon
    Yes that is what the splitter does. its allows you to drag the splitter
    and give more or less space to the widgets it controls.

    To fast try it out.
    Place any 2 widget on a form. then select both and
    then right clik. Now in Layout menu there is option to
    insert splitter between them.

    alt text

    ManiRonM Offline
    ManiRonM Offline
    ManiRon
    wrote on last edited by
    #11

    @mrjj

    It worked sir thanks

    1 Reply Last reply
    1
    • mrjjM mrjj

      @ManiRon
      Yes that is what the splitter does. its allows you to drag the splitter
      and give more or less space to the widgets it controls.

      To fast try it out.
      Place any 2 widget on a form. then select both and
      then right clik. Now in Layout menu there is option to
      insert splitter between them.

      alt text

      ManiRonM Offline
      ManiRonM Offline
      ManiRon
      wrote on last edited by
      #12

      @mrjj

      Sir i inserted a background image and set background color for a QTableWidget but i amgetting it like this 0_1548069526329_Untitled.jpg

      But i want it to be same for the whole table and the font color for the items also to be changed to white . How can i do this ?

      1 Reply Last reply
      0
      • mrjjM mrjj

        @ManiRon
        Yes that is what the splitter does. its allows you to drag the splitter
        and give more or less space to the widgets it controls.

        To fast try it out.
        Place any 2 widget on a form. then select both and
        then right clik. Now in Layout menu there is option to
        insert splitter between them.

        alt text

        ManiRonM Offline
        ManiRonM Offline
        ManiRon
        wrote on last edited by
        #13

        @mrjj and another doubt is that i want to have a tick mark in the menu item when it is pressed . whether it can be done or not ?

        mrjjM 1 Reply Last reply
        0
        • ManiRonM ManiRon

          @mrjj and another doubt is that i want to have a tick mark in the menu item when it is pressed . whether it can be done or not ?

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #14

          @ManiRon
          Hi
          You mean in a QMenu or in the QTableWidget ?

          ManiRonM 2 Replies Last reply
          0
          • mrjjM mrjj

            @ManiRon
            Hi
            You mean in a QMenu or in the QTableWidget ?

            ManiRonM Offline
            ManiRonM Offline
            ManiRon
            wrote on last edited by
            #15

            @mrjj Its solved sir,

            But facing a new one .

            I have added a style sheet for a pushbutton
            Stylesheet:
            background-color: qradialgradient(spread:pad, cx:0.499807, cy:0.489, radius:0.8, fx:0.499, fy:0.488909, stop:0.0795455 rgba(0, 147, 185, 255), stop:1 rgba(50, 50, 50, 255));
            border: 1px solid black;
            border-radius: 8px;
            color:white;

            But i want to highlight when its pressed but when i add that its not working is there any sequence i should follow?

            1 Reply Last reply
            0
            • mrjjM mrjj

              @ManiRon
              Hi
              You mean in a QMenu or in the QTableWidget ?

              ManiRonM Offline
              ManiRonM Offline
              ManiRon
              wrote on last edited by
              #16

              @mrjj

              Sir how to bring the pressed effect to a push button in QT when style sheet is added

              mrjjM 1 Reply Last reply
              0
              • ManiRonM ManiRon

                @mrjj

                Sir how to bring the pressed effect to a push button in QT when style sheet is added

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #17

                @ManiRon
                Hi
                Its has a state for it

                QPushButton:pressed {
                  background-color: qradialgradient(spread:pad, cx:0.499807, cy:0.489, radius:0.8, fx:0.499, fy:0.488909, 
                  stop:0.0795455 rgba(0, 147, 185, 255), stop:1 rgba(50, 50, 50, 255));
                  border: 1px solid black;
                  border-radius: 8px;
                  color:white;
                }
                

                http://doc.qt.io/qt-5/stylesheet-examples.html

                ManiRonM 1 Reply Last reply
                2
                • mrjjM mrjj

                  @ManiRon
                  Hi
                  Its has a state for it

                  QPushButton:pressed {
                    background-color: qradialgradient(spread:pad, cx:0.499807, cy:0.489, radius:0.8, fx:0.499, fy:0.488909, 
                    stop:0.0795455 rgba(0, 147, 185, 255), stop:1 rgba(50, 50, 50, 255));
                    border: 1px solid black;
                    border-radius: 8px;
                    color:white;
                  }
                  

                  http://doc.qt.io/qt-5/stylesheet-examples.html

                  ManiRonM Offline
                  ManiRonM Offline
                  ManiRon
                  wrote on last edited by
                  #18

                  @mrjj i gave it sir but know change

                  QPushButton{background-color:qradialgradient(spread:pad, cx:0.499807, cy:0.489, radius:0.8, fx:0.499, fy:0.488909,stop:0.0795455 rgba(0, 147, 185, 255), stop:1 rgba(50, 50, 50, 255));
                  border: 1px solid black;
                  border-radius: 8px;
                  color:white;}

                  QPushButton:hover:!pressed
                  {
                  background-color: qradialgradient(spread:pad, cx:0.499807, cy:0.489, radius:0.8, fx:0.499, fy:0.488909, stop:0.0795455 rgba(0, 150, 190, 255), stop:1 rgba(50, 50, 100, 255));
                  border: 2px solid black;
                  border-radius: 8px;
                  color:white;
                  }

                  mrjjM 1 Reply Last reply
                  0
                  • ManiRonM ManiRon

                    @mrjj i gave it sir but know change

                    QPushButton{background-color:qradialgradient(spread:pad, cx:0.499807, cy:0.489, radius:0.8, fx:0.499, fy:0.488909,stop:0.0795455 rgba(0, 147, 185, 255), stop:1 rgba(50, 50, 50, 255));
                    border: 1px solid black;
                    border-radius: 8px;
                    color:white;}

                    QPushButton:hover:!pressed
                    {
                    background-color: qradialgradient(spread:pad, cx:0.499807, cy:0.489, radius:0.8, fx:0.499, fy:0.488909, stop:0.0795455 rgba(0, 150, 190, 255), stop:1 rgba(50, 50, 100, 255));
                    border: 2px solid black;
                    border-radius: 8px;
                    color:white;
                    }

                    mrjjM Offline
                    mrjjM Offline
                    mrjj
                    Lifetime Qt Champion
                    wrote on last edited by
                    #19

                    @ManiRon
                    Hi
                    Why use ! (not pressed ) ?
                    as that is same as normal ?

                    ManiRonM 1 Reply Last reply
                    0
                    • mrjjM mrjj

                      @ManiRon
                      Hi
                      Why use ! (not pressed ) ?
                      as that is same as normal ?

                      ManiRonM Offline
                      ManiRonM Offline
                      ManiRon
                      wrote on last edited by
                      #20

                      @mrjj yes sir i removed it but i want an effect which all buttons have when pressed

                      ManiRonM 1 Reply Last reply
                      0
                      • ManiRonM ManiRon

                        @mrjj yes sir i removed it but i want an effect which all buttons have when pressed

                        ManiRonM Offline
                        ManiRonM Offline
                        ManiRon
                        wrote on last edited by
                        #21

                        @ManiRon

                        For example when we press a button we feel like it goes inside and comes back like that effect i want

                        mrjjM 1 Reply Last reply
                        0
                        • ManiRonM ManiRon

                          @ManiRon

                          For example when we press a button we feel like it goes inside and comes back like that effect i want

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by
                          #22

                          @ManiRon
                          Hi
                          to keep the pressed down effect, then only assign
                          background-color: do not change anything with border as that disabled the down effect.
                          alt text

                          Else you have to create such effect your self.

                          ManiRonM 1 Reply Last reply
                          1
                          • mrjjM mrjj

                            @ManiRon
                            Hi
                            to keep the pressed down effect, then only assign
                            background-color: do not change anything with border as that disabled the down effect.
                            alt text

                            Else you have to create such effect your self.

                            ManiRonM Offline
                            ManiRonM Offline
                            ManiRon
                            wrote on last edited by
                            #23

                            @mrjj

                            how can we create ? is there any way sir?

                            mrjjM 1 Reply Last reply
                            0
                            • ManiRonM ManiRon

                              @mrjj

                              how can we create ? is there any way sir?

                              mrjjM Offline
                              mrjjM Offline
                              mrjj
                              Lifetime Qt Champion
                              wrote on last edited by
                              #24

                              @ManiRon
                              Hi
                              You can use the
                              border-top-color
                              border-right-color
                              border-bottom-color
                              border-left-color
                              to draw the normal "3d" effect in both normal and pressed state
                              or use
                              border.image
                              http://doc.qt.io/qt-5/stylesheet-reference.html#border-image

                              http://doc.qt.io/qt-5/stylesheet-reference.html

                              1 Reply Last reply
                              1

                              • Login

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