Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • Is there possible to make and test qt program online ?

    Solved
    4
    1 Votes
    4 Posts
    2k Views
    Q
    @SGaist said in Is there possible to make and test qt program online ?: JupyterHub no just like online GDB for c
  • mac os sdk12 not working with Qt bluetooth

    Unsolved
    4
    0 Votes
    4 Posts
    911 Views
    A
    Yes I noticed already that there are bug reports for qt 6.2 and macOS 12. As you said the scanning is working outside if you the add the key in the Info.plist. This works for starting the scanning but it does not find any Low Energy Devices. Or could you scan for Low energy devices at all?
  • From the Qt blog: Widgets on a header

    4
    0 Votes
    4 Posts
    2k Views
    M
    https://www.qt.io/blog/2012/09/28/qt-support-weekly-27-widgets-on-a-header
  • finding similar functions of QTableWidget as that of QTableView

    Solved
    5
    0 Votes
    5 Posts
    628 Views
    Swati777999S
    @JonB With some experimentation, I got the desired result.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    18 Views
    No one has replied
  • How to react to light/dark mode changes in macos?

    Unsolved
    5
    0 Votes
    5 Posts
    2k Views
    J.HilkJ
    a swift (hehe) google search resulted in this so topic https://stackoverflow.com/a/52406553/15422846 its objective c, so you should be able to include it in your c++ project
  • Array of widgets and inputting the limit of for-loop iteration from the users

    Solved
    8
    0 Votes
    8 Posts
    1k Views
    Swati777999S
    @Thank-You I've shared my solution and marked it as the best answer. Thanks.. :)
  • 0 Votes
    13 Posts
    1k Views
    S
    @SocketSackett Continuing ... I found the suggestion on Stack Overflow to use: db = QSqlDatabase(); db.removeDatabase(cnxn); after the close was a way to fix the duplicate connection close error. This is wrong. Doing this will not allow the work done to be updated. I removed that, & did a straight DB close, & it is updating once again. Checking for pre-existence of DB path with the QSqlDatabase::database.isValid() will suffice & is a good approach.
  • 0 Votes
    16 Posts
    2k Views
    pgiovanniP
    AH I FIGURED IT OUT. So for whatever reason, since i was creating a new QGroupBox pieGroup every time the function was called that somehow prevented the title from updating. So I changed it to create the new groupbox on the first click only. Now all the other clicks just update the title. I don't know what's going on under the covers. but it works now.
  • General question about qmake

    Solved
    4
    0 Votes
    4 Posts
    454 Views
    D
    @raven-worx Not at all sure what I did wrong before (it's been a while), but did just what I would have expected it to do. Problem solved
  • How to exclude generated moc_files from direct compilation?

    Unsolved
    2
    0 Votes
    2 Posts
    203 Views
    SGaistS
    Hi, If you declare slots, you need to have them implemented even if the method is empty.
  • 0 Votes
    3 Posts
    1k Views
    raven-worxR
    @Dariusz said in cmake automoc + dll... error LNK2001: unresolved external symbol "public: static struct QMetaObject: Do I have to write some kind of post build command that copies all moc files to some location & ship it with my dll/include folder? no, the moc data is compiled into your binary, like any other class/method etc. Since you are using cmake, did you set the AUTOMOC property?! https://doc.qt.io/qt-6/cmake-get-started.html
  • Qt and pkg-config

    Unsolved
    12
    0 Votes
    12 Posts
    2k Views
    SGaistS
    Qt has support for pkg-config both to use it to link to libraries as well as for the lib template. From the looks of it, on Debian, there are .pc files available for the various Qt modules.
  • Experimenting with the layouts

    Unsolved
    3
    0 Votes
    3 Posts
    278 Views
    JoeCFDJ
    Try it in designer which has preview ==>Form==>Preview in==>Fusion Style to make sure the layouts are right and then generate your C++ code.
  • QScreen returning the wrong size for my monitor

    Unsolved
    6
    0 Votes
    6 Posts
    3k Views
    M
    @feistykittykat Thank you very much! That worked for me as well. Was driving me nuts that it used to work when I was doing 5.x development and since going to 6.2.1 I have found a lot of gotchas in my code!
  • Static build is slower than dynamic build

    Solved
    12
    0 Votes
    12 Posts
    886 Views
    P
    Compiled Qt statically with -static-runtime enabled, and now the slowdown is gone. Maybe finding libstdc++ and libgcc was slow. I'll still need to do some more testing, but Im positive that this was the problem
  • How to Build and Install Missing Qt Modules?

    Solved qt3d qtdatavis3d modules qt5
    3
    0 Votes
    3 Posts
    2k Views
    N
    Yup. You can find the packages under Pi Menu > Preferences > Add/Remove Software. Doing a search there will eventually bring up the needed modules. I am still curious as how one builds the modules separately though. Thanks again!
  • Functions of QWidgets used for QTableWidgets

    Unsolved
    2
    0 Votes
    2 Posts
    159 Views
    JonBJ
    @Swati777999 said in Functions of QWidgets used for QTableWidgets: QTableWidgets class is a subclass of QtWidgets. The functions of QWidgets can be used for QTableWidgets objects. Yup. I have found some functions not working in my program. Like what? Yes you can call methods of QWidget on, say, QTableWidget. I have another doubt, can public slots be used as public member functions of a class? ? Yes, public slots are just public methods.
  • QTableView Vs QTableWidget creating a table

    Solved
    3
    0 Votes
    3 Posts
    617 Views
    Swati777999S
    @sierdzio Thanks.
  • Populating a vector of QPieSlices

    Solved
    2
    0 Votes
    2 Posts
    188 Views
    jsulmJ
    @pgiovanni said in Populating a vector of QPieSlices: QPieSlice it is derived from QObject. QObjects are NOT copyable! So, store pointers to QPieSlice in your vector.