Home > Mobile >  QT how location specified in the control's display text, such as QRadioButton, only on the left
QT how location specified in the control's display text, such as QRadioButton, only on the left

Time:09-20

QT QRadioButton controls how to set the text color and size, show the location of QRadioButton words can only display on the right side? QPushButton such display text can not arbitrarily set position (within the scope of control)? Don't say what the left right up and down, I mean the controls within the scope of any position

CodePudding user response:

QRadioButton can consider together with Label tied, the text in the Label display (this operation with the Designer will be very convenient, pure code word I am not sure, but it should be through in a Layout inside), QPushButton, I really don't see the custom text turn help document the location of the information, the superclass QAbstractButton, may draw the new text directly by PaintEvent position? I'm not very sure (as the true introduction to programming, haven't see you had just finished watching the QML says this situation is full of himself to draw a button directly with QML, at least in pure painting control QML does a lot of convenient than QSS),

CodePudding user response:

And another one is the style sheet may be able to adjust the position of text, but I didn't check the qt style sheets adjust the position of information, I am also not familiar with the style sheet...

CodePudding user response:

Can use cascading style sheets (CSS) to determine the control's text format

CodePudding user response:

Garbage QT I hold, I don't know why people use, with flexible uilib ten thousand times

CodePudding user response:

QRadioButton not to set the text, use a QLabel put text which is still not to put where?
Is one of the earliest contact about Qt haisi on the run, the existence of a thing is certainly has a certain meaning,
At least on Windows than MFC useful?
Write a code can run android/Windows/Linux also ok?

Even if you don't have some control system, also can use QWidget pinched controls to play, which is bad to use, which oneself pinch, think what tweak is what kind,
  •  Tags:  
  • Qt
  • Related