B
B
bitkoljas2021-07-15 12:32:14
Python
bitkoljas, 2021-07-15 12:32:14

How to move frame on button click in PyQtDesigner?

The button has the following code responsible for its visual design

QPushButton {
     border: 2px solid #8f8f91;
     border-radius: 6px;
     background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                       stop: 0 #293036, stop: 1 #1e2326);
     min-width: 80px;
     font: 12pt "Times New Roman";
     color: rgb(161, 167, 185);
 }
 QPushButton:hover{
  border: 2px solid #50a5a6;
}

 QPushButton:pressed {
     background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
                                       stop: 0 #1e2326, stop: 1 #293036);
 }

 QPushButton:flat {
     border: none;
 }

 QPushButton:default {
     border-color: navy;
     border: 2px solid #8f8f91;
 }

So, how to make it so that when you click, not only the direction of the gradient changes, but also the frame with the name SettingsFrame moves to the coordinates X: 10 Y: 15? Or is it possible to implement this only in the Python code itself?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question