1

Topic: Problem with stylesheet

Good afternoon, Misters. Is available QMainWindow, in it are available QDockWidgets. At an output I do of application saveGeometry (); saveState (); at start accordingly: restoreGeometry (ByteArray); restoreState (ByteArray); but after usage restoreState (ByteArray); I cannot apply setStyleSheet () to QDockWidget', they remain standard and everything what to make, that it was possible to apply normally style to ?

2

Re: Problem with stylesheet

Hello, arfaa, you wrote: A> Good afternoon, Misters. Is available QMainWindow, in it are available QDockWidgets. At an output I do of application A> to QDockWidget', they remain standard and everything what to make, that it was possible to apply normally style to ? Qt did not update casually? 1) Poprbovat to remove saving and  states after that to make style application, to look works/not works. 2) to try to make setStylesheet postponed after  states restore (); QTimer:: singleShot ([] {setStyleSheet ()}); 3) Try to make a minimum example

3

Re: Problem with stylesheet

Hello, Igore, you wrote: I> Hello, arfaa, you wrote: A>> Good afternoon, Misters. Is available QMainWindow, in it are available QDockWidgets. At an output I do of application A>> to QDockWidget', they remain standard and everything what to make, that it was possible to apply normally style to ? I> Qt did not update casually? I> 1) Poprbovat to remove saving and  states after that to make style application, to look works/not works. I> 2) to try to make setStylesheet postponed after  states I> restore (); I> QTimer:: singleShot ([] {setStyleSheet ()}); I> 3) Try to make a minimum example This all clearly, naturally already tried and in the timer including. Whether there can be a problem as QMainWindow lies inside QWidget?

4

Re: Problem with stylesheet

Hello, arfaa, you wrote: A>>> Good afternoon, Misters. Is available QMainWindow, in it are available QDockWidgets. At an output I do of application A>>> to QDockWidget', they remain standard and everything what to make, that it was possible to apply normally style to ? I>> Qt did not update casually? I>> 1) Poprbovat to remove saving and  states after that to make style application, to look works/not works. I>> 2) to try to make setStylesheet postponed after  states I>> restore (); I>> QTimer:: singleShot ([] {setStyleSheet ()}); I>> 3) Try to make a minimum example A> It is all clearly, naturally already tried and in the timer including. Whether there can be a problem as QMainWindow lies inside QWidget? It is all fine, but answers that what? Styles or not without state recovery work? And an example of style of the elementary too result, well and version Qt-a specify just in case.

5

Re: Problem with stylesheet

Hello, Igore, you wrote: I> Hello, arfaa, you wrote: A>>>> Good afternoon, Misters. Is available QMainWindow, in it are available QDockWidgets. At an output I do of application A>>>> to QDockWidget', they remain standard and everything what to make, that it was possible to apply normally style to ? I>>> Qt did not update casually? I>>> 1) Poprbovat to remove saving and  states after that to make style application, to look works/not works. I>>> 2) to try to make setStylesheet postponed after  states I>>> restore (); I>>> QTimer:: singleShot ([] {setStyleSheet ()}); I>>> 3) Try to make a minimum example A>> It is all clearly, naturally already tried and in the timer including. Whether there can be a problem as QMainWindow lies inside QWidget? I> It is all fine, but answers that what? Styles or not without state recovery work? I> And an example of style of the elementary too result, well and version Qt-a specify just in case. Without MyWindow-> restoreState (value) styles work! An example in the timer: QTabBar* tabBarDockWidget = _mainWindow-> findChild <QTabBar*> (); if (tabBarDockWidget) tabBarDockWidget-> setStyleSheet ("QTabBar:: tab::! selected {background-color: green; border: 0.5px solid black;}"); Qt 5.5.1 I Will repeat, without setting the states resulted above code line make immediate impact on style!

6

Re: Problem with stylesheet

Hello, arfaa, you wrote: A>>>>> Good afternoon, Misters. Is available QMainWindow, in it are available QDockWidgets. At an output I do of application A>>>>> to QDockWidget', they remain standard and everything what to make, that it was possible to apply normally style to ? I>>>> Qt did not update casually? I>>>> 1) Poprbovat to remove saving and  states after that to make style application, to look works/not works. I>>>> 2) to try to make setStylesheet postponed after  states I>>>> restore (); I>>>> QTimer:: singleShot ([] {setStyleSheet ()}); I>>>> 3) Try to make a minimum example A>>> It is all clearly, naturally already tried and in the timer including. Whether there can be a problem as QMainWindow lies inside QWidget? I>> It is all fine, but answers that what? Styles or not without state recovery work? I>> And an example of style of the elementary too result, well and version Qt-a specify just in case. A> MyWindow-> restoreState (value) Whence undertakes value as well as where it is stored, there that precisely lies that was saved from MyWindow? It is possible to try to save state not Window, and it is immediate QDockWidgets, and  it, in the console by the way any errors not ? A> I Will repeat, without setting the states resulted above code line make immediate impact on style! Well, not attentively read.

7

Re: Problem with stylesheet

Hello, Igore, you wrote: I> Hello, arfaa, you wrote: A>>>>>> Good afternoon, Misters. Is available QMainWindow, in it are available QDockWidgets. At an output I do of application A>>>>>> to QDockWidget', they remain standard and everything what to make, that it was possible to apply normally style to ? I>>>>> Qt did not update casually? I>>>>> 1) Poprbovat to remove saving and  states after that to make style application, to look works/not works. I>>>>> 2) to try to make setStylesheet postponed after  states I>>>>> restore (); I>>>>> QTimer:: singleShot ([] {setStyleSheet ()}); I>>>>> 3) Try to make a minimum example A>>>> It is all clearly, naturally already tried and in the timer including. Whether there can be a problem as QMainWindow lies inside QWidget? I>>> It is all fine, but answers that what? Styles or not without state recovery work? I>>> and an example of style of the elementary too result, well and version Qt-a specify just in case. A>> MyWindow-> restoreState (value) I> Whence undertakes value as well as where it is stored, there that precisely lies that was saved from MyWindow? It is possible to try to save state not Window, and it is immediate QDockWidgets, and  it, in the console by the way any errors not ? A>> I Will repeat, without setting the states resulted above code line make immediate impact on style! I> it is good, not attentively read. value, from the register it undertakes similar, and it is saved: _appSettings-> setValue ("launcher/mainWindowGeometry", _mainWindow-> saveGeometry ()); Errors are not present, all works !

8

Re: Problem with stylesheet

Hello, arfaa, you wrote: A> Errors are not present, all works ! The key changed? Write an auxiliary class which all for you will do through installEventFilter, there it will be possible at passage on new Qt, in one place to correct that all earned. Faced that that at change of version Qt old saved saveGeometry spoils current layout on new Qt-e.