Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • Remove stretch in QVBoxLayout ?

    Solved
    9
    0 Votes
    9 Posts
    9k Views
    S
    you can create a layout and at the start add a stretch with layout.addstretch() then instert the widget at position count() - 1, ie layout.insertwidget(layout.count()-1, widget, *args, **kwargs)
  • How to display half of the number through QPainter?

    Unsolved
    2
    0 Votes
    2 Posts
    183 Views
    SGaistS
    Hi, To me what you describe is clipping. So you paint normally and the clipping rect limits what is shown.
  • This topic is deleted!

    Unsolved
    3
    0 Votes
    3 Posts
    38 Views
  • How to disable log messages in Application Output of Qt Creator?

    Unsolved
    5
    0 Votes
    5 Posts
    2k Views
    SGaistS
    Not knowing what you implemented I can't answer to that issue.
  • Can't convert from QJsonValue to int.

    Solved
    23
    0 Votes
    23 Posts
    4k Views
    JoeCFDJ
    Your data has problem. Use mine( my test code works) to see if your code works. { "font": { "family": "Calibri", "pointSize": 11 }, "toolBarColor": { "red": 156, "green": 244, "blue": 230 }, "oldSplashscreen": false, "darkTheme": false } Are you working on Windows? the integer values may have some endings which can not be parsed properly by Qt code. I manually changed them. My test code works. In your output code add str = str.simplified() to get rid of them.
  • Multiple Windows - best practise

    Solved
    6
    0 Votes
    6 Posts
    607 Views
    L
    Thanks for the replies!
  • Again "<omp.h> not found"...

    Solved
    7
    0 Votes
    7 Posts
    8k Views
    R
    @JKSH said in Again "<omp.h> not found"...: It comes from the static code analyser that is based on libclang. Thank you very much for this information - I did not know this (I am programming on C++ not so long ago)! @JKSH said in Again "<omp.h> not found"...: Again, notice that the code builds and runs, which means that the compiler can find them even if the code analyser can't find them. Yes, you are right - everything really works without directly indicating the directory. Of course, I think I should direct the report to Qt, which I will do. Thank you again!
  • setGeometry Unable to set geometry

    Unsolved
    13
    0 Votes
    13 Posts
    10k Views
    Cobra91151C
    @SPlatten said in setGeometry Unable to set geometry: @Cobra91151 If the MainWindow is the at the top level of the application, there isn't a parent is there? If you mean something like this: Code: int main(int argc, char *argv[]) { QApplication a(argc, argv); Dialog w; w.show(); return a.exec(); } Then no parent is needed. But, if you have some object class in which you check what dialog to display as the top level, then I would suggest setParent to the app object: Code: int main(int argc, char *argv[]) { QApplication a(argc, argv); MyStartup obj; obj.setParent(&a); return a.exec(); } But I do not think it will fix your issue. Have you tried for example: setFixedSize method to check if this issue still exists? Also, you can set setWindowFlags method: Qt::MSWindowsFixedSizeDialogHint to make window not resizable on Windows just for a test. Additionally, you can try to find what causes it using the code below in your main method (main.cpp): #ifdef QT_DEBUG qputenv("QT_FATAL_WARNINGS", "1"); qputenv("QT_MESSAGE_PATTERN", "Type: %{type}\nProduct Name: %{appname}\nFile: %{file}\nLine: %{line}\nMethod: %{function}\nThreadID: %{threadid}\nThreadPtr: %{qthreadptr}\nMessage: %{message}"); #endif It will work only in Debug mode and should display more details about your issue. Without any code it is hard to find the root of your issue.
  • qthread with multiple tasks and void

    Solved
    7
    0 Votes
    7 Posts
    828 Views
    faduF
    @jsulm thanks a lot this what i searching about it i just asking for the right way to make my codes better and stable
  • Equivalent to QFileDialog::getExistingDirectory for file ?

    Solved
    3
    0 Votes
    3 Posts
    210 Views
    SPlattenS
    Thank you, looking at this now.
  • vlc-qt giving error when compiling

    Unsolved
    16
    0 Votes
    16 Posts
    1k Views
    ?
    @jsulm i think i do installed it. Capture.png
  • QXmpp doesn't connect to server when button clicked

    Solved
    4
    0 Votes
    4 Posts
    379 Views
    jsulmJ
    @siya said in QXmpp doesn't connect to server when button clicked: Allocated from heap Would be easier to simply make client class member - no need to allocate on the heap (and delete later when not needed anymore).
  • Oauth2 with code and token

    Unsolved
    3
    0 Votes
    3 Posts
    388 Views
    P
    When I have signed (on the authentication page) in and clicked on the captcha I will be redirected to the url where I can get the code. The code is there and I see the message in the browser. But I should receive it directly in my program parse it and further use for the oauth process.
  • QTreewidget adding child based on tab space in the beginning

    Solved
    10
    0 Votes
    10 Posts
    1k Views
    123newuser1
    @eyllanesc i got confused with "mid" but now i read the qt documentation its clear thank you for your time
  • How to get MacAddesses and Vendor information in surroundings Wifi signals?

    Unsolved
    12
    0 Votes
    12 Posts
    996 Views
    mrjjM
    @Mijaz Hi the mac layer is on driver level and Qt has nothing for that as far as i know. Most likely you would need to use a library like https://www.tcpdump.org/ (Libpcap ) to be able to get such information.
  • Exclude plugins

    Solved
    18
    0 Votes
    18 Posts
    2k Views
    S
    Putting an empty qt.conf file looks for the plugins in the local directory. Having plugins/platforms/libqxcb.so is enough to start designer without any additional elements Thanks to all!
  • Configuration Parameters for downloaded installer

    Unsolved
    2
    0 Votes
    2 Posts
    173 Views
    eyllanescE
    @RickFrank You should ask the company for that information. This forum is not the technical support of the company.
  • use of deleted function 'QFile::QFile(const QFile

    Solved
    3
    0 Votes
    3 Posts
    655 Views
    faduF
    @SGaist Thank you very much The Problem Is Solved As you saw
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • How to set up slots for QXmpp signals

    Solved
    6
    0 Votes
    6 Posts
    431 Views
    S
    @ChrisW67 @mrjj yes thank you, that was the issue (not allocating before making the connect line). Silly me - thank you for the help :)