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 to fix the whole white widget what is in fact not ?
Qt 6.11 is out! See what's new in the release blog

how to fix the whole white widget what is in fact not ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 971 Views
  • 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.
  • nicker playerN Offline
    nicker playerN Offline
    nicker player
    wrote on last edited by
    #1

    Ive made a desktop app,and it worked fine in some windows platform.but one was shown nothing but only the whole white widget,and the debugger dosent give me anything useful.so what part of the code caused this problem.

    QtWebEngine::initialize();
    QApplication::setAttribute(Qt::AA_UseOpenGLES);
    QString t_style = "windowsxp";
        QStringList keyList = QStyleFactory::keys();
        for(int i = 0; i < keyList.length(); i++)
        {
            t_style = keyList.at(i);
            if(t_style.contains("vista") || t_style.contains("Vista")){
                t_style = "windowsvista";
            }
        }
    QApplication::setStyle(QStyleFactory::create(t_style));
    QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
            QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
    
    1 Reply Last reply
    0
    • JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      I don't know. But how do we or you know whether you are using style windowsxp or windowsvista? Simple common sense: Start by removing the if and testing once with windowsxp or windowsvista unconditionally. Does that make any difference? If yes then it's something to do with style, if not then the style is not at issue.

      1 Reply Last reply
      3

      • Login

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