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
dwcroninAsked:
Who is Participating?
 
mish33Connect With a Mentor Commented:
Window title is controlled by OS window manager according with QStyle.
Try apply different style or create your own.
0
 
sunnycoderCommented:
Hi dwcronin,

what is the class you used - QMainWindow?

Cheers!
sunnycoder
0
 
rajeev_devinCommented:
In Qt you cannot control the alignment of window title.
Check whether you put some whitespace in the window title.
0
 
rajeev_devinCommented:
If you want to cotrol the titlebar then do check this
http://www.trolltech.com/customer/knowledgebase/535
0
 
dwcroninAuthor Commented:
Sunnycoder,

The beginning of the code that creates a window is:
===========================  start code  ==========================================
    // create main screen
    MultiUsePalette.setColor(QPalette::Background, Qt::lightGray);
    PmeMockupConflict.DeviceWin = new SrtsWidget();
    PmeMockupConflict.DeviceWin->setWindowTitle("PME Mockup Conflict");
    PmeMockupConflict.DeviceWin->setPalette(MultiUsePalette);
    //set initial screen size
   PmeMockupConflict.DeviceWin->setGeometry(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
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.