Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.3k Topics 455.6k Posts
  • Global #define in Qt project. How?

    Solved
    2
    0 Votes
    2 Posts
    158 Views
    B
    Solution found. Issue closed. In *.pro file: DEFINES += SOME_VALUE Here full explanation https://stackoverflow.com/questions/3348711/add-a-define-to-qmake-with-a-value
  • Try toi debug my program

    Unsolved
    8
    0 Votes
    8 Posts
    370 Views
    JonBJ
    @Xav12358 Then I'm afraid I don't know since it's some PyCharm debugger issue.
  • OpenGL: problem with setting swap behaviour

    Unsolved
    1
    0 Votes
    1 Posts
    109 Views
    No one has replied
  • QVector question

    Solved
    3
    0 Votes
    3 Posts
    155 Views
    K
    @Paul-Colby Thanx.
  • const function causes garbage collection crashes with QMap.

    Unsolved
    7
    0 Votes
    7 Posts
    511 Views
    JonBJ
    @mjsmithers said in const function causes garbage collection crashes with QMap.: experiment more with Qmap::value(), although it's not clear from the documentation if it returns a copy or a const reference. As per my previous, I think this is 100% clear?
  • How to execute command installed with snap

    Unsolved
    5
    0 Votes
    5 Posts
    537 Views
    JonBJ
    @ChrisW67 said in How to execute command installed with snap: Then the relevant directory is not in the PATH inherited by your process. On my Ubuntu machine the /snap/bin directory is in the system-wide path. Which is as I wrote above. However, I do not see a connection between lpr and snap. On a generic Ubuntu machine lpr is a compatibility tool installed as a native application by CUPS: I agree, this has nothing to do with snap. It should be in /usr/bin. That should be on $PATH already. @Stormbringer1900 said in How to execute command installed with snap: If I try QProcess::execute("whereis lpr"); there's no reply. whereis itself is in /usr/bin/. If by any chance, somehow, /usr/bin is not on PATH then the whereis itself will fail to execute. What is the return result from QProcess::execute()? Did it write anything to stdout/err? Probably the first thing to try is echo $PATH # or possibly /bin/echo $PATH Compare calling via QProcess from Qt app against what it is in external shell where lpr etc. work.
  • QThread infinite loop

    Unsolved
    12
    0 Votes
    12 Posts
    2k Views
    jeremy_kJ
    @SimonSchroeder said in QThread infinite loop: //-----8<--------------------------------------------- QThread *thread = new QThread(); thread->start(); // could also be done later MyClass *obj = new MyClass(); obj->moveToThread(thread); QTimer *timer = new QTimer(); timer->setInterval(1000); QObject::connect(timer, &QTimer::timout, obj, &MyClass::periodicFunction); timer->moveToThread(thread); timer->start(); Multithreading is hard! The timer->start() should come before timer->moveToThread(). I would also establish the connection from the QTimer instance to MyClass instance before moving the later. It's paranoia in this case, but prevents connecting to deleted objects in some realistic scenarios.
  • This topic is deleted!

    Solved
    3
    0 Votes
    3 Posts
    14 Views
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    6 Views
    No one has replied
  • QGuiApplication::focusWindow() always return null in wayland platform

    Unsolved
    4
    1 Votes
    4 Posts
    784 Views
    M
    @Ggwp1234 I think you should show a window in the first place, or maybe you mean to use applicationStateChanged signal ?
  • File names should be lowercase?

    Unsolved
    4
    0 Votes
    4 Posts
    247 Views
    SGaistS
    @AndrzejB the installer does nothing in that regard. They are generated if memory serves well.
  • Newbie questions: installation, setup, licences etc.

    Unsolved
    5
    0 Votes
    5 Posts
    231 Views
    C
    @cdvo I found my way. I removed all designer*.qm files under the translation folder but left the en one. Thanks
  • String and implicit sharing

    Unsolved
    2
    0 Votes
    2 Posts
    133 Views
    Christian EhrlicherC
    As long as you don't access the object via a non-const function there is only one QString instance with '"some Text"'.
  • QT Creator gtest error

    Unsolved
    3
    0 Votes
    3 Posts
    179 Views
    R
    @jsulm No it does not build.
  • How to fix application crash under Win11

    Unsolved
    4
    0 Votes
    4 Posts
    843 Views
    JonBJ
    @Oeschi said in How to fix application crash under Win11: ExceptionCode: 0xe0464645 Searching for this seems to generate hits all to do with NVidia gfx card? In dwm.exe.
  • How do i Change my role to get the community edition of Qt?

    Unsolved
    2
    0 Votes
    2 Posts
    250 Views
    jsulmJ
    @Amos-graham No need to change anything in your account. Simply select the OSS version when installing Qt.
  • QtSerialPort and FTDI Driver Issues

    Unsolved
    4
    0 Votes
    4 Posts
    634 Views
    Christian EhrlicherC
    @samfallday said in QtSerialPort and FTDI Driver Issues: I assume these other 3rd party programs are built on the Windows API and that is what makes the difference. Qt is using the same windows api as other tools - they don't add some magic new functions to Qt. You have to find out what they're doing different to Qt.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    5 Views
    No one has replied
  • snap7 and Qt Creator

    Solved
    12
    0 Votes
    12 Posts
    1k Views
    M
    @markolino_it please how can i do step 1 (compile the library with file.bat)