[Qt-interest] setWindowTitle in parent class
Israel Brewster
israel at frontierflying.com
Wed Feb 4 21:24:16 CET 2009
Is there any way to set a window's title in it's parent class and make
it stick? I have a number of forms I have designed using QtDesigner.
In the class declarations for these forms (using the multiple
inheritance approach, although I believe the same would be true of the
member approach), all of the classes inherit from the same base class
that I wrote, as there are certain functions and behaviors I want all
of forms to share. This works out well-for the most part.
One of the behaviors I want all of the classes to share is the window
title - this being not a static string, but a file name set at
runtime. However, if I try setting the window title in the constructor
of the base class, it is over-ridden by what was set in QtDesigner
when I run setupUI(). I can, of course, set the window title after
running setupUI, but then I have to have the same line of code in each
child class, rather than having it once in the base class. Is there
anyway to get around this? Thanks.
-----------------------------------------------
Israel Brewster
Computer Support Technician
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------
More information about the Qt-interest-old
mailing list