Align icon on the right and center the text in a QPushButton
I'm trying to align the icon to the right and center the text in a QPushButton, but I'm not satisfied with the result for now. I would also like the icon to be completely to the right of the QPushButton and not centered with the text. Likewise I would like this to work with an icon positioned to the right or left while being able to choose the width of the button. Do you have a solution ? Can you help me ? Here is my code for now:
# Les boutons du bas pour passer d'une page à l'autre
bout_pag_charg_enr_phase_1 = QPushButton("Aller directement à la page de maintenance de la Séquence")
bout_pag_charg_enr_phase_1.setFixedWidth(406)
bout_pag_charg_enr_phase_1.setIcon(QIcon('logo_png_apsc'+os.sep+'icone_3_fleches_droite_apsc_256x256.png'))
bout_pag_charg_enr_phase_1.setIconSize(QSize(16, 16))
bout_pag_charg_enr_phase_1.setLayoutDirection(Qt.RightToLeft)
bout_pag_charg_enr_phase_1.setStyleSheet("text-align: center; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fdfbf7, stop: 1 #6190F2);border-style: solid;border-width: 2px;border-radius: 8px;border-color: #9BB7F0;padding: 3px")
bout_pag_suivante_phase_1 = QPushButton("Page suivante")
bout_pag_suivante_phase_1.setFixedWidth(120)
bout_pag_suivante_phase_1.setIcon(QIcon('logo_png_apsc'+os.sep+'icone_2_fleches_droite_apsc_256x256.png'))
bout_pag_suivante_phase_1.setIconSize(QSize(16, 16))
bout_pag_suivante_phase_1.setLayoutDirection(Qt.RightToLeft)
bout_pag_suivante_phase_1.setStyleSheet("background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fdfbf7, stop: 1 #6190F2);border-style: solid;border-width: 2px;border-radius: 8px;border-color: #9BB7F0;padding: 3px")
What I get:
What I want:
python python-3.x pyqt5 qpushbutton qicon
add a comment |
I'm trying to align the icon to the right and center the text in a QPushButton, but I'm not satisfied with the result for now. I would also like the icon to be completely to the right of the QPushButton and not centered with the text. Likewise I would like this to work with an icon positioned to the right or left while being able to choose the width of the button. Do you have a solution ? Can you help me ? Here is my code for now:
# Les boutons du bas pour passer d'une page à l'autre
bout_pag_charg_enr_phase_1 = QPushButton("Aller directement à la page de maintenance de la Séquence")
bout_pag_charg_enr_phase_1.setFixedWidth(406)
bout_pag_charg_enr_phase_1.setIcon(QIcon('logo_png_apsc'+os.sep+'icone_3_fleches_droite_apsc_256x256.png'))
bout_pag_charg_enr_phase_1.setIconSize(QSize(16, 16))
bout_pag_charg_enr_phase_1.setLayoutDirection(Qt.RightToLeft)
bout_pag_charg_enr_phase_1.setStyleSheet("text-align: center; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fdfbf7, stop: 1 #6190F2);border-style: solid;border-width: 2px;border-radius: 8px;border-color: #9BB7F0;padding: 3px")
bout_pag_suivante_phase_1 = QPushButton("Page suivante")
bout_pag_suivante_phase_1.setFixedWidth(120)
bout_pag_suivante_phase_1.setIcon(QIcon('logo_png_apsc'+os.sep+'icone_2_fleches_droite_apsc_256x256.png'))
bout_pag_suivante_phase_1.setIconSize(QSize(16, 16))
bout_pag_suivante_phase_1.setLayoutDirection(Qt.RightToLeft)
bout_pag_suivante_phase_1.setStyleSheet("background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fdfbf7, stop: 1 #6190F2);border-style: solid;border-width: 2px;border-radius: 8px;border-color: #9BB7F0;padding: 3px")
What I get:
What I want:
python python-3.x pyqt5 qpushbutton qicon
You could show a picture of what you get, and what you want to get
– eyllanesc
Nov 21 '18 at 15:33
What I get --> image.noelshack.com/fichiers/2018/47/3/… .
– ekdmekdm
Nov 21 '18 at 16:15
What I want --> image.noelshack.com/fichiers/2018/47/3/…
– ekdmekdm
Nov 21 '18 at 16:16
add a comment |
I'm trying to align the icon to the right and center the text in a QPushButton, but I'm not satisfied with the result for now. I would also like the icon to be completely to the right of the QPushButton and not centered with the text. Likewise I would like this to work with an icon positioned to the right or left while being able to choose the width of the button. Do you have a solution ? Can you help me ? Here is my code for now:
# Les boutons du bas pour passer d'une page à l'autre
bout_pag_charg_enr_phase_1 = QPushButton("Aller directement à la page de maintenance de la Séquence")
bout_pag_charg_enr_phase_1.setFixedWidth(406)
bout_pag_charg_enr_phase_1.setIcon(QIcon('logo_png_apsc'+os.sep+'icone_3_fleches_droite_apsc_256x256.png'))
bout_pag_charg_enr_phase_1.setIconSize(QSize(16, 16))
bout_pag_charg_enr_phase_1.setLayoutDirection(Qt.RightToLeft)
bout_pag_charg_enr_phase_1.setStyleSheet("text-align: center; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fdfbf7, stop: 1 #6190F2);border-style: solid;border-width: 2px;border-radius: 8px;border-color: #9BB7F0;padding: 3px")
bout_pag_suivante_phase_1 = QPushButton("Page suivante")
bout_pag_suivante_phase_1.setFixedWidth(120)
bout_pag_suivante_phase_1.setIcon(QIcon('logo_png_apsc'+os.sep+'icone_2_fleches_droite_apsc_256x256.png'))
bout_pag_suivante_phase_1.setIconSize(QSize(16, 16))
bout_pag_suivante_phase_1.setLayoutDirection(Qt.RightToLeft)
bout_pag_suivante_phase_1.setStyleSheet("background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fdfbf7, stop: 1 #6190F2);border-style: solid;border-width: 2px;border-radius: 8px;border-color: #9BB7F0;padding: 3px")
What I get:
What I want:
python python-3.x pyqt5 qpushbutton qicon
I'm trying to align the icon to the right and center the text in a QPushButton, but I'm not satisfied with the result for now. I would also like the icon to be completely to the right of the QPushButton and not centered with the text. Likewise I would like this to work with an icon positioned to the right or left while being able to choose the width of the button. Do you have a solution ? Can you help me ? Here is my code for now:
# Les boutons du bas pour passer d'une page à l'autre
bout_pag_charg_enr_phase_1 = QPushButton("Aller directement à la page de maintenance de la Séquence")
bout_pag_charg_enr_phase_1.setFixedWidth(406)
bout_pag_charg_enr_phase_1.setIcon(QIcon('logo_png_apsc'+os.sep+'icone_3_fleches_droite_apsc_256x256.png'))
bout_pag_charg_enr_phase_1.setIconSize(QSize(16, 16))
bout_pag_charg_enr_phase_1.setLayoutDirection(Qt.RightToLeft)
bout_pag_charg_enr_phase_1.setStyleSheet("text-align: center; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fdfbf7, stop: 1 #6190F2);border-style: solid;border-width: 2px;border-radius: 8px;border-color: #9BB7F0;padding: 3px")
bout_pag_suivante_phase_1 = QPushButton("Page suivante")
bout_pag_suivante_phase_1.setFixedWidth(120)
bout_pag_suivante_phase_1.setIcon(QIcon('logo_png_apsc'+os.sep+'icone_2_fleches_droite_apsc_256x256.png'))
bout_pag_suivante_phase_1.setIconSize(QSize(16, 16))
bout_pag_suivante_phase_1.setLayoutDirection(Qt.RightToLeft)
bout_pag_suivante_phase_1.setStyleSheet("background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fdfbf7, stop: 1 #6190F2);border-style: solid;border-width: 2px;border-radius: 8px;border-color: #9BB7F0;padding: 3px")
What I get:
What I want:
python python-3.x pyqt5 qpushbutton qicon
python python-3.x pyqt5 qpushbutton qicon
edited Nov 21 '18 at 16:20
eyllanesc
83.4k103562
83.4k103562
asked Nov 21 '18 at 15:29
ekdmekdmekdmekdm
246
246
You could show a picture of what you get, and what you want to get
– eyllanesc
Nov 21 '18 at 15:33
What I get --> image.noelshack.com/fichiers/2018/47/3/… .
– ekdmekdm
Nov 21 '18 at 16:15
What I want --> image.noelshack.com/fichiers/2018/47/3/…
– ekdmekdm
Nov 21 '18 at 16:16
add a comment |
You could show a picture of what you get, and what you want to get
– eyllanesc
Nov 21 '18 at 15:33
What I get --> image.noelshack.com/fichiers/2018/47/3/… .
– ekdmekdm
Nov 21 '18 at 16:15
What I want --> image.noelshack.com/fichiers/2018/47/3/…
– ekdmekdm
Nov 21 '18 at 16:16
You could show a picture of what you get, and what you want to get
– eyllanesc
Nov 21 '18 at 15:33
You could show a picture of what you get, and what you want to get
– eyllanesc
Nov 21 '18 at 15:33
What I get --> image.noelshack.com/fichiers/2018/47/3/… .
– ekdmekdm
Nov 21 '18 at 16:15
What I get --> image.noelshack.com/fichiers/2018/47/3/… .
– ekdmekdm
Nov 21 '18 at 16:15
What I want --> image.noelshack.com/fichiers/2018/47/3/…
– ekdmekdm
Nov 21 '18 at 16:16
What I want --> image.noelshack.com/fichiers/2018/47/3/…
– ekdmekdm
Nov 21 '18 at 16:16
add a comment |
1 Answer
1
active
oldest
votes
A possible solution is to place on top and on the right side a QLabel that shows the icon.
import os
from PyQt5 import QtCore, QtGui, QtWidgets
class PushButton(QtWidgets.QPushButton):
def __init__(self, *args, **kwargs):
super(PushButton, self).__init__(*args, **kwargs)
self.setStyleSheet('''background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fdfbf7, stop: 1 #6190F2);
border-style: solid;border-width: 2px;
border-radius: 8px;
border-color: #9BB7F0;padding: 3px;''')
icon = self.icon()
icon_size = self.iconSize()
# remove icon
self.setIcon(QtGui.QIcon())
label_icon = QtWidgets.QLabel()
label_icon.setAttribute(QtCore.Qt.WA_TranslucentBackground)
label_icon.setAttribute(QtCore.Qt.WA_TransparentForMouseEvents)
lay = QtWidgets.QHBoxLayout(self)
lay.setContentsMargins(0, 0, 0, 0)
lay.addWidget(label_icon, alignment=QtCore.Qt.AlignRight)
label_icon.setPixmap(icon.pixmap(icon_size))
class MyWindow(QtWidgets.QWidget):
def __init__(self, parent=None):
super(MyWindow, self).__init__(parent)
icon = QtWidgets.QApplication.style().standardIcon(QtWidgets.QStyle.SP_ArrowRight)
# icon = QtGui.QIcon(os.path.join('logo_png_apsc', 'icone_3_fleches_droite_apsc_256x256.png'))
bout_pag_charg_enr_phase_1 = PushButton("Aller directement à la page de maintenance de la Séquence",
icon=icon, iconSize=QtCore.QSize(16, 16))
bout_pag_charg_enr_phase_1.setFixedWidth(506)
bout_pag_suivante_phase_1 = PushButton("Page suivante",
icon=icon, iconSize=QtCore.QSize(16, 16))
bout_pag_suivante_phase_1.setFixedWidth(140)
lay = QtWidgets.QHBoxLayout(self)
lay.addWidget(bout_pag_charg_enr_phase_1)
lay.addWidget(bout_pag_suivante_phase_1)
if __name__ == '__main__':
import sys
app = QtWidgets.QApplication(sys.argv)
main = MyWindow()
main.show()
sys.exit(app.exec_())
I just tested and it works. By adapting it a bit your solution is exactly what I was looking for ! Many thanks !
– ekdmekdm
Nov 21 '18 at 17:51
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53415379%2falign-icon-on-the-right-and-center-the-text-in-a-qpushbutton%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
A possible solution is to place on top and on the right side a QLabel that shows the icon.
import os
from PyQt5 import QtCore, QtGui, QtWidgets
class PushButton(QtWidgets.QPushButton):
def __init__(self, *args, **kwargs):
super(PushButton, self).__init__(*args, **kwargs)
self.setStyleSheet('''background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fdfbf7, stop: 1 #6190F2);
border-style: solid;border-width: 2px;
border-radius: 8px;
border-color: #9BB7F0;padding: 3px;''')
icon = self.icon()
icon_size = self.iconSize()
# remove icon
self.setIcon(QtGui.QIcon())
label_icon = QtWidgets.QLabel()
label_icon.setAttribute(QtCore.Qt.WA_TranslucentBackground)
label_icon.setAttribute(QtCore.Qt.WA_TransparentForMouseEvents)
lay = QtWidgets.QHBoxLayout(self)
lay.setContentsMargins(0, 0, 0, 0)
lay.addWidget(label_icon, alignment=QtCore.Qt.AlignRight)
label_icon.setPixmap(icon.pixmap(icon_size))
class MyWindow(QtWidgets.QWidget):
def __init__(self, parent=None):
super(MyWindow, self).__init__(parent)
icon = QtWidgets.QApplication.style().standardIcon(QtWidgets.QStyle.SP_ArrowRight)
# icon = QtGui.QIcon(os.path.join('logo_png_apsc', 'icone_3_fleches_droite_apsc_256x256.png'))
bout_pag_charg_enr_phase_1 = PushButton("Aller directement à la page de maintenance de la Séquence",
icon=icon, iconSize=QtCore.QSize(16, 16))
bout_pag_charg_enr_phase_1.setFixedWidth(506)
bout_pag_suivante_phase_1 = PushButton("Page suivante",
icon=icon, iconSize=QtCore.QSize(16, 16))
bout_pag_suivante_phase_1.setFixedWidth(140)
lay = QtWidgets.QHBoxLayout(self)
lay.addWidget(bout_pag_charg_enr_phase_1)
lay.addWidget(bout_pag_suivante_phase_1)
if __name__ == '__main__':
import sys
app = QtWidgets.QApplication(sys.argv)
main = MyWindow()
main.show()
sys.exit(app.exec_())
I just tested and it works. By adapting it a bit your solution is exactly what I was looking for ! Many thanks !
– ekdmekdm
Nov 21 '18 at 17:51
add a comment |
A possible solution is to place on top and on the right side a QLabel that shows the icon.
import os
from PyQt5 import QtCore, QtGui, QtWidgets
class PushButton(QtWidgets.QPushButton):
def __init__(self, *args, **kwargs):
super(PushButton, self).__init__(*args, **kwargs)
self.setStyleSheet('''background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fdfbf7, stop: 1 #6190F2);
border-style: solid;border-width: 2px;
border-radius: 8px;
border-color: #9BB7F0;padding: 3px;''')
icon = self.icon()
icon_size = self.iconSize()
# remove icon
self.setIcon(QtGui.QIcon())
label_icon = QtWidgets.QLabel()
label_icon.setAttribute(QtCore.Qt.WA_TranslucentBackground)
label_icon.setAttribute(QtCore.Qt.WA_TransparentForMouseEvents)
lay = QtWidgets.QHBoxLayout(self)
lay.setContentsMargins(0, 0, 0, 0)
lay.addWidget(label_icon, alignment=QtCore.Qt.AlignRight)
label_icon.setPixmap(icon.pixmap(icon_size))
class MyWindow(QtWidgets.QWidget):
def __init__(self, parent=None):
super(MyWindow, self).__init__(parent)
icon = QtWidgets.QApplication.style().standardIcon(QtWidgets.QStyle.SP_ArrowRight)
# icon = QtGui.QIcon(os.path.join('logo_png_apsc', 'icone_3_fleches_droite_apsc_256x256.png'))
bout_pag_charg_enr_phase_1 = PushButton("Aller directement à la page de maintenance de la Séquence",
icon=icon, iconSize=QtCore.QSize(16, 16))
bout_pag_charg_enr_phase_1.setFixedWidth(506)
bout_pag_suivante_phase_1 = PushButton("Page suivante",
icon=icon, iconSize=QtCore.QSize(16, 16))
bout_pag_suivante_phase_1.setFixedWidth(140)
lay = QtWidgets.QHBoxLayout(self)
lay.addWidget(bout_pag_charg_enr_phase_1)
lay.addWidget(bout_pag_suivante_phase_1)
if __name__ == '__main__':
import sys
app = QtWidgets.QApplication(sys.argv)
main = MyWindow()
main.show()
sys.exit(app.exec_())
I just tested and it works. By adapting it a bit your solution is exactly what I was looking for ! Many thanks !
– ekdmekdm
Nov 21 '18 at 17:51
add a comment |
A possible solution is to place on top and on the right side a QLabel that shows the icon.
import os
from PyQt5 import QtCore, QtGui, QtWidgets
class PushButton(QtWidgets.QPushButton):
def __init__(self, *args, **kwargs):
super(PushButton, self).__init__(*args, **kwargs)
self.setStyleSheet('''background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fdfbf7, stop: 1 #6190F2);
border-style: solid;border-width: 2px;
border-radius: 8px;
border-color: #9BB7F0;padding: 3px;''')
icon = self.icon()
icon_size = self.iconSize()
# remove icon
self.setIcon(QtGui.QIcon())
label_icon = QtWidgets.QLabel()
label_icon.setAttribute(QtCore.Qt.WA_TranslucentBackground)
label_icon.setAttribute(QtCore.Qt.WA_TransparentForMouseEvents)
lay = QtWidgets.QHBoxLayout(self)
lay.setContentsMargins(0, 0, 0, 0)
lay.addWidget(label_icon, alignment=QtCore.Qt.AlignRight)
label_icon.setPixmap(icon.pixmap(icon_size))
class MyWindow(QtWidgets.QWidget):
def __init__(self, parent=None):
super(MyWindow, self).__init__(parent)
icon = QtWidgets.QApplication.style().standardIcon(QtWidgets.QStyle.SP_ArrowRight)
# icon = QtGui.QIcon(os.path.join('logo_png_apsc', 'icone_3_fleches_droite_apsc_256x256.png'))
bout_pag_charg_enr_phase_1 = PushButton("Aller directement à la page de maintenance de la Séquence",
icon=icon, iconSize=QtCore.QSize(16, 16))
bout_pag_charg_enr_phase_1.setFixedWidth(506)
bout_pag_suivante_phase_1 = PushButton("Page suivante",
icon=icon, iconSize=QtCore.QSize(16, 16))
bout_pag_suivante_phase_1.setFixedWidth(140)
lay = QtWidgets.QHBoxLayout(self)
lay.addWidget(bout_pag_charg_enr_phase_1)
lay.addWidget(bout_pag_suivante_phase_1)
if __name__ == '__main__':
import sys
app = QtWidgets.QApplication(sys.argv)
main = MyWindow()
main.show()
sys.exit(app.exec_())
A possible solution is to place on top and on the right side a QLabel that shows the icon.
import os
from PyQt5 import QtCore, QtGui, QtWidgets
class PushButton(QtWidgets.QPushButton):
def __init__(self, *args, **kwargs):
super(PushButton, self).__init__(*args, **kwargs)
self.setStyleSheet('''background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #fdfbf7, stop: 1 #6190F2);
border-style: solid;border-width: 2px;
border-radius: 8px;
border-color: #9BB7F0;padding: 3px;''')
icon = self.icon()
icon_size = self.iconSize()
# remove icon
self.setIcon(QtGui.QIcon())
label_icon = QtWidgets.QLabel()
label_icon.setAttribute(QtCore.Qt.WA_TranslucentBackground)
label_icon.setAttribute(QtCore.Qt.WA_TransparentForMouseEvents)
lay = QtWidgets.QHBoxLayout(self)
lay.setContentsMargins(0, 0, 0, 0)
lay.addWidget(label_icon, alignment=QtCore.Qt.AlignRight)
label_icon.setPixmap(icon.pixmap(icon_size))
class MyWindow(QtWidgets.QWidget):
def __init__(self, parent=None):
super(MyWindow, self).__init__(parent)
icon = QtWidgets.QApplication.style().standardIcon(QtWidgets.QStyle.SP_ArrowRight)
# icon = QtGui.QIcon(os.path.join('logo_png_apsc', 'icone_3_fleches_droite_apsc_256x256.png'))
bout_pag_charg_enr_phase_1 = PushButton("Aller directement à la page de maintenance de la Séquence",
icon=icon, iconSize=QtCore.QSize(16, 16))
bout_pag_charg_enr_phase_1.setFixedWidth(506)
bout_pag_suivante_phase_1 = PushButton("Page suivante",
icon=icon, iconSize=QtCore.QSize(16, 16))
bout_pag_suivante_phase_1.setFixedWidth(140)
lay = QtWidgets.QHBoxLayout(self)
lay.addWidget(bout_pag_charg_enr_phase_1)
lay.addWidget(bout_pag_suivante_phase_1)
if __name__ == '__main__':
import sys
app = QtWidgets.QApplication(sys.argv)
main = MyWindow()
main.show()
sys.exit(app.exec_())
answered Nov 21 '18 at 17:13
eyllanesceyllanesc
83.4k103562
83.4k103562
I just tested and it works. By adapting it a bit your solution is exactly what I was looking for ! Many thanks !
– ekdmekdm
Nov 21 '18 at 17:51
add a comment |
I just tested and it works. By adapting it a bit your solution is exactly what I was looking for ! Many thanks !
– ekdmekdm
Nov 21 '18 at 17:51
I just tested and it works. By adapting it a bit your solution is exactly what I was looking for ! Many thanks !
– ekdmekdm
Nov 21 '18 at 17:51
I just tested and it works. By adapting it a bit your solution is exactly what I was looking for ! Many thanks !
– ekdmekdm
Nov 21 '18 at 17:51
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53415379%2falign-icon-on-the-right-and-center-the-text-in-a-qpushbutton%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You could show a picture of what you get, and what you want to get
– eyllanesc
Nov 21 '18 at 15:33
What I get --> image.noelshack.com/fichiers/2018/47/3/… .
– ekdmekdm
Nov 21 '18 at 16:15
What I want --> image.noelshack.com/fichiers/2018/47/3/…
– ekdmekdm
Nov 21 '18 at 16:16