githubuser0xFFFF / Qt-Advanced-Docking-System

Advanced Docking System for Qt
GNU Lesser General Public License v2.1
1.87k stars 548 forks source link

Under AutoHideDockWidget, the setWindowTitle method cannot be synchronized to the pop-up screen #637

Closed jenifly closed 5 months ago

jenifly commented 5 months ago

Under AutoHideDockWidget, the setWindowTitle method cannot be synchronized to the pop-up screen

githubuser0xFFFF commented 5 months ago

Sorry, could you please elaborate. I do not understand what you mean. I cannot find the file or class AutoHideDockWidget.

jenifly commented 5 months ago

Sorry, could you please elaborate. I do not understand what you mean. I cannot find the file or class AutoHideDockWidget.

like this... image

githubuser0xFFFF commented 5 months ago

You cannot set the window title explicetely via setWindowTitle because the windows title of the dock widget is its title you give in constructor.

jenifly commented 5 months ago

You cannot set the window title explicetely via setWindowTitle because the windows title of the dock widget is its title you give in constructor.

That way, when I switch languages, the title of the widget cannot be changed

jenifly commented 5 months ago

You cannot set the window title explicetely via setWindowTitle because the windows title of the dock widget is its title you give in constructor.

That way, when I switch languages, the title of the widget cannot be changed

image

githubuser0xFFFF commented 5 months ago

You need to set the custom window title earlier before you add the dock widget to the DockManager:

    TableDockWidget = new CDockWidget("Table 2");
    TableDockWidget->setWindowTitle("Custom Window Title");

works here

jenifly commented 5 months ago

You need to set the custom window title earlier before you add the dock widget to the DockManager:

    TableDockWidget = new CDockWidget("Table 2");
    TableDockWidget->setWindowTitle("Custom Window Title");

works here

yes, but it's calling

DockManager->addAutoHideDockWidget(SideBarLocation::SideBarLeft, TableDockWidget);

Then window title of the pop-up form cannot be changed. How can I change this window title?

githubuser0xFFFF commented 5 months ago

I don't know what you mean - this is how it looks like after the two lines above:

2024-05-21_15h45_13