Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.9k Posts
  • QTimer does not fire slot

    Unsolved qtimer failed
    6
    0 Votes
    6 Posts
    1k Views
    JonBJ
    @ulix You have a QTimer in a thread which does not run the Qt event loop, does it? So no signals will be delivered. Hence your finding: The timer expires but the slot never gets called, by the way if a I call QCoreApplication::processEvents(); after the sleep time the slot gets called. That processEvents() is the first time the evet loop is invoked. Your thread needs to be running the event loop all the time if that's where the timer is ticking (unless you move the timer to the main UI thread). See QThread::run() & QThread::exec().
  • 0 Votes
    2 Posts
    182 Views
    JonBJ
    @Dummie1138 What does "being edited" mean for a QSpinBox? The only thing you can check for is whether it has focus. There is no editingFinished signal. Separately: you have a timer expiring every second and code in ticker() which adds 1 second for the time to show. How accurate do you expect this to be? The timeout may occur any time after 1 second has elapsed. You should not rely on it expiring at exactly one second. This may mean your time "wanders" over a period. Suggest you use a QElapsedTimer or re-read the wall clock time and subtract the start time periodically.
  • Built application display components not correct

    Unsolved
    3
    0 Votes
    3 Posts
    339 Views
    SabracS
    @jsulm my UI created using qtcreator ui designer, the app still run normal, no stuck, no "not responding"
  • QTableWidget

    Unsolved
    3
    0 Votes
    3 Posts
    243 Views
    JonBJ
    @Umer As @jsulm says. Note that a widget (or for that matter a layout), such as a "table", is an actual object and cannot be in two places at the same time. If you want it to appear on the main window and also elsewhere on another window you need to create separate instances.
  • Text Edit example with wrong heading behavior

    Unsolved
    2
    0 Votes
    2 Posts
    187 Views
    jsulmJ
    @felipef You should report bugs here: https://bugreports.qt.io/secure/Dashboard.jspa
  • qt stopped to call output terminal, how to fix it?

    Unsolved
    3
    0 Votes
    3 Posts
    174 Views
    C
    You say it "stopped", which means it used to work, so what was the last thing you did before it stopped working? Also, the output of what is not getting called? Is it the output of a project? A simple program? A build? How are you trying to output it? Which Qt version are you using? What is your current OS? Spare no related details.
  • How to best model data for Model/View

    Unsolved
    5
    0 Votes
    5 Posts
    476 Views
    V
    @SGaist I had considered the option but thought I could keep avoiding implementing the database, which I've never done. Now it seems like implementing the models as QSqlTableModel and QSqlRelationalTableModel accessing the database is indeed the most sensible option in the long term. Thanks for your suggestion!
  • 0 Votes
    9 Posts
    479 Views
    Christian EhrlicherC
    @JonB said in Segmentation fault when calling 3 methods, works normally when calling only 2 of same methods: LOL, well spotted! :) But only at the second sight... I overlooked it during the first reading because I normally don't use these iterators. It's much easier to read and write it this way: const QVector<User> userList = json.getUsersBrief(); for (const aut&user : userList) append({user.getName(), user.getLastName(), user.getEmail()}); reset(); // whyever this is needed, begin/endInsertRows() would suffice here.
  • Text Edit example doesn't always update the style combo box after deleting text

    Unsolved
    1
    0 Votes
    1 Posts
    113 Views
    No one has replied
  • not needed command prompt OS window

    Unsolved
    6
    0 Votes
    6 Posts
    380 Views
    R
    @Christian-Ehrlicher Not url. I display some text from local PC, not network.
  • Build Android Apps with Qt

    Unsolved
    4
    0 Votes
    4 Posts
    362 Views
    ?
    @thomasGl I think you should try older versions of jdk. In Qt 5.15's documentation they claim that jdk version 11 and later are supported but I had problems with jdk 19 with Qt 6.4.2 while jdk 17 works smooth. I think jdk 19 is way too recent for such an old version of Qt.
  • Access the function of another window.

    Unsolved
    2
    0 Votes
    2 Posts
    181 Views
    JonBJ
    @kipalex said in Access the function of another window.: signal: public slots slot: Please start by correcting these for yourself so it compiles. You did not find either of these out there on the web. Use the documentation or examples, there are so many you don't need to make someone else write it for you. Though see below as you may not need either. connect(this, &MainWindow::credentials, &Configuration::Configuration, &Configuration::ReadXML); &Configuration::Configuration is incorrect. It requires a pointer to the slot object. If you are creating a "Configuration window" as you say then use the instance here. If the main window creates the configuration window then there is no point having a signal, connecting and emitting. It might as well just call Configuration::ReadXML() when it wants to.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • QLabel text with embedded ellipsis

    Unsolved
    7
    0 Votes
    7 Posts
    741 Views
    PerdrixP
    @Christian-Ehrlicher Because sometimes we think that the basic framework should provide a function and are surprised when it doesn't. Furthermore we are often under time pressure, and don't always know how best to handle stuff Sure given time and resources we can write what's needed, but sometimes we hope that it is there for the taking!
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • QSettings crashes immediately

    Solved qsettings
    6
    0 Votes
    6 Posts
    920 Views
    SavizS
    @SGaist That is a very good point. I will change it.
  • Sharing 1 QSharedPointer across 2 classes?

    Solved
    3
    0 Votes
    3 Posts
    257 Views
    C
    @Christian-Ehrlicher Oh that's good to know thank you.
  • 0 Votes
    1 Posts
    142 Views
    No one has replied
  • Put a button on the qlabel that fills the screen

    Solved
    4
    0 Votes
    4 Posts
    798 Views
    C
    If you have to use a QLabel for your background (because there better ways to do so) then I suggest using its geometry. set its pos to (0,0), and size to the size of your window or central widget, and you might also need to change its Z-Order in which case you can use lower or raise functions this topic might be of use : Bring widget at the back of another widget
  • qt 5.5.1 open source license diteiles

    Unsolved
    6
    0 Votes
    6 Posts
    498 Views
    L
    @ChrisW67 tnx, in the base library open-source you can only see the list of the licenses and not the use for each module. the other link for each module is helpful, I have to look for each module separately but it's more than I found until now.