Forum
Sign Up

QSS and changing Ribbonstyle crashes the app.

9 years 2 months ago #1 by Frank
I am using a qss (css) file for styling my application. This file is loaded in the main.cpp and it works well. But if I try to change the style (from blue to black) the application crashed.

I am using the qtribbon 2.1 - demo version.

Thanks in advanced for your help or hint. :-)

Frank

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago - 9 years 2 months ago #2 by Developer Machines
Hello Frank!
When you apply css-style, Qt will replace the object available from QAllicoation::style() on its own - QStyleSheetStyle. In the demo we're trying to get this object and cast it to the RibbonStyle. So if you plan to use the css-style you need to pre-save a reference to the RibbonStyle and use it.

I would like to clarify the purposes for which you want to use CSS?
Maybe it can be activated in the Qtitan::Office2007Stlye/RibbonStlye...
Last edit: 9 years 2 months ago by Developer Machines.

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #3 by Frank

bigz wrote: Hello Frank!

I would like to clarify the purposes for which you want to use CSS?
Maybe it can be activated in the Qtitan::Office2007Stlye/RibbonStlye...


My program is an SDI form so every widget has the same color of the selected ribbon style
and i change the color of some widgets / frames and panels so it looks a bit nicer. ;-)

If you like i can make some screenshots.

btw: first i load and set the qss file in the main.cpp and then i set the ribbon-style
in the constructor of the first window.

Frank

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #4 by Developer Machines
Look at the some screenshots would be very helpful.
Well, in any case in combination with the CSS it is better to have a separate reference to the ribbon style.

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago - 9 years 2 months ago #5 by Frank
Sorry, i'm unable to upload the files and if i click to the insert button i
get an 'insert' lik this:



which i think is not right.

If you like i can send the screenshots by email with an pm from you with
your email address. ;-)

Frank
Last edit: 9 years 2 months ago by Frank.

Please Log in or Create an account to join the conversation.

More
9 years 2 months ago #6 by Developer Machines
Sure send screenshot to This email address is being protected from spambots. You need JavaScript enabled to view it.. In the subject of the email please enter the title of this forum topic.

Please Log in or Create an account to join the conversation.

More
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer MachinesEduard
Time to create page: 0.163 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )