dwcronin
asked on
Qt window title alignment
I have created a window that has a title. The title is unfortunately centered in the title across the top of window. How do I make it left justified?
Thanks
Thanks
In Qt you cannot control the alignment of window title.
Check whether you put some whitespace in the window title.
Check whether you put some whitespace in the window title.
If you want to cotrol the titlebar then do check this
http://www.trolltech.com/customer/knowledgebase/535
http://www.trolltech.com/customer/knowledgebase/535
ASKER
Sunnycoder,
The beginning of the code that creates a window is:
========================== = start code ========================== ========== ======
// create main screen
MultiUsePalette.setColor(Q Palette::B ackground, Qt::lightGray);
PmeMockupConflict.DeviceWi n = new SrtsWidget();
PmeMockupConflict.DeviceWi n->setWind owTitle("P ME Mockup Conflict");
PmeMockupConflict.DeviceWi n->setPale tte(MultiU sePalette) ;
//set initial screen size
PmeMockupConflict.DeviceWi n->setGeom etry(62, 20, 900, 450);
========================== = end code ========================== ========== ========
========================== == start of structure used above ========================== =
struct PmeMockupConflict_s {
QAction * Act;
SrtsWidget * DeviceWin;
QPushButton * skipLessonBtn;
QPushButton * studentWaitBtn;
QPushButton * editLessonListBtn;
QLabel * windowTitleLbl;
QLabel * listTitleLbl1;
QLabel * listTitleLbl2;
QLineEdit * projectIdLineEdit;
QGridLayout *MainGrid;
QHBoxLayout *HLButtons;
QWidget *TopSpaceFiller;
QWidget *BottomSpaceFiller;
QListWidget * List;
};
========================== end of structure used above ========================== =====
I am trying to left justify the window title given above: "PME Mockup Conflict"
It seems to default to the midle of the title bar and I'm not certain where I have to put a command to left justify it.
Dan
The beginning of the code that creates a window is:
==========================
// create main screen
MultiUsePalette.setColor(Q
PmeMockupConflict.DeviceWi
PmeMockupConflict.DeviceWi
PmeMockupConflict.DeviceWi
//set initial screen size
PmeMockupConflict.DeviceWi
==========================
==========================
struct PmeMockupConflict_s {
QAction * Act;
SrtsWidget * DeviceWin;
QPushButton * skipLessonBtn;
QPushButton * studentWaitBtn;
QPushButton * editLessonListBtn;
QLabel * windowTitleLbl;
QLabel * listTitleLbl1;
QLabel * listTitleLbl2;
QLineEdit * projectIdLineEdit;
QGridLayout *MainGrid;
QHBoxLayout *HLButtons;
QWidget *TopSpaceFiller;
QWidget *BottomSpaceFiller;
QListWidget * List;
};
==========================
I am trying to left justify the window title given above: "PME Mockup Conflict"
It seems to default to the midle of the title bar and I'm not certain where I have to put a command to left justify it.
Dan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
what is the class you used - QMainWindow?
Cheers!
sunnycoder