Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How do I make *.ui files look like real interface of an app?
Forum Updated to NodeBB v4.3 + New Features

How do I make *.ui files look like real interface of an app?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt creatorc++ui file
3 Posts 3 Posters 468 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    RDWTT
    wrote on last edited by
    #1

    Hello everyone!
    I'm new to Qt and to programming. I develop an application where I apply .qss to a whole window or individually to each component by using a->setStyleSheet(styles->pushButtonDefault) (styles is .cpp file where I store qstrings with different stylesheets). But these changes aren't displayed in the .ui in Qt Creator. Adding styles directly to components in the .ui file doesn't work for me because some components are created dynamically and some styles are changed while application is running (for example if you put wrong number in the input field, the field becomes red).
    So, the question is: is it possible to show changes to UI in the Qt creator .ui files?

    I use Qt 5.15.2 and C++

    Thanks πŸ‘πŸΌ

    C 1 Reply Last reply
    0
    • R RDWTT

      Hello everyone!
      I'm new to Qt and to programming. I develop an application where I apply .qss to a whole window or individually to each component by using a->setStyleSheet(styles->pushButtonDefault) (styles is .cpp file where I store qstrings with different stylesheets). But these changes aren't displayed in the .ui in Qt Creator. Adding styles directly to components in the .ui file doesn't work for me because some components are created dynamically and some styles are changed while application is running (for example if you put wrong number in the input field, the field becomes red).
      So, the question is: is it possible to show changes to UI in the Qt creator .ui files?

      I use Qt 5.15.2 and C++

      Thanks πŸ‘πŸΌ

      C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      @RDWTT Qt Creator (Designer) cannot display a preview of anything that is not in the .ui file.

      The .ui files are text used to generate source code before compilation. What you are asking for is indeterminate changes made at runtime, i.e. after compilation and deployment, to somehow roll back into the .ui file. I cannot see how this would be achievable (or useful).

      The way to see how the ui looks in this circumstance is to build and run your program.

      1 Reply Last reply
      1
      • Axel SpoerlA Offline
        Axel SpoerlA Offline
        Axel Spoerl
        Moderators
        wrote on last edited by
        #3

        …and on a side note: Qt 5.15 isn’t ideal to start developing a new app! Much better to start with 6.5!

        Software Engineer
        The Qt Company, Oslo

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved