Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Last 52 lines are not written in csv file.

    Solved
    19
    0 Votes
    19 Posts
    1k Views
    D
    @jsulm @Christian-Ehrlicher @JonB my issue is solved thank you all for your help and reply. i have write wrong object name with close(). now my issue was solved. thank you all. and sorry for my mistake.
  • How do I create charts by data receieved by a server? Im very new to qt

    Unsolved
    18
    0 Votes
    18 Posts
    1k Views
    D
    @J-Hilk ohh thanks but do you know what's the issue I can't seem to figure it out
  • How can i change expansion direction?

    Unsolved
    5
    0 Votes
    5 Posts
    401 Views
    Y
    Yes, I dont use layouts.
  • QEvent derived classes

    Solved
    2
    0 Votes
    2 Posts
    236 Views
    Pl45m4P
    @esoteric At least the default ones should be... (one of those). Custom, registrated user events should have the type QEvent::User - QEvent::MaxUser and an ID between 1000 and 65535
  • QProcess will not execute QProcess::started

    Unsolved
    6
    0 Votes
    6 Posts
    504 Views
    Christian EhrlicherC
    @AnneRanch So did you actually read and understood my first post? Then you would know why I asked for the complete function. But my english seems to be to bad for a native english speaker...
  • What is the easiest way to desing an "edit mode" via my GUI in QtDesigner?

    Solved
    9
    0 Votes
    9 Posts
    1k Views
    ?
    @JonB Thank you very much for your tip! I have now managed it as follows: ui->firstPage->layout()->addWidget(editor); My problem is solved. Thank you
  • why am I getting this "qDebug (QString) error ?

    Unsolved
    7
    0 Votes
    7 Posts
    529 Views
    Christian EhrlicherC
    Because qDebug() is a class which is defined in <QDebug> and qDebug(const char*) is a function defined in <QtGlobal>. So when you do not include the correct header, the compiler will not find the function/class - what's wrong with this statement here? Even the compiler tells you that the type is unknown to him but you kindly ignored the warning.
  • moc "Can't concatenate non identifier tokens"

    Unsolved
    2
    0 Votes
    2 Posts
    250 Views
    raven-worxR
    @Murzila looks like this issue: https://lists.qt-project.org/pipermail/interest/2015-August/018446.html
  • convert word doc to pdf using qt cpp

    Unsolved
    18
    0 Votes
    18 Posts
    2k Views
    H
    Thank u its working this code is working this problem is because of not having pulgings only finally it is resolved.
  • This topic is deleted!

    Unsolved
    5
    0 Votes
    5 Posts
    56 Views
  • Need a control to show a image and draw on it and scrollable

    Solved
    6
    0 Votes
    6 Posts
    726 Views
    Pl45m4P
    @jronald Is the widget larger than the scrollable area? If not, there's no need for scrollBars. Only if the widget's height/width exceeds the area, the scrollBars appear. So you probably need to make your widget bigger
  • setStyleSheet sometimes not working

    Solved
    19
    0 Votes
    19 Posts
    1k Views
    JonBJ
    @Jakob-Clausen said in setStyleSheet sometimes not working: Is that bad? [Nested QLabels.] I don't know, I've never done it!
  • First letter of password becomes upper cased when using yubi key

    Solved
    4
    0 Votes
    4 Posts
    343 Views
    S
    For anyone who encounters the same issue, it was a bug in the Qt QPA X11/XCB. See this issue: https://bugreports.qt.io/browse/QTBUG-95933 .
  • Bulding / adding subprojects ??

    Solved
    17
    0 Votes
    17 Posts
    5k Views
    NevezN
    @AnneRanch you are a great person. I searched many sites all day long. However, I was more confused about what to do. After reading and applying what in your last post, I've literally succeeded. Really thank you so much. Have a nice day..
  • Mouse grabbing not working in menu with qwidgetaction

    Unsolved
    5
    0 Votes
    5 Posts
    629 Views
    SGaistS
    One issue I can see here is that you are using different means to grab and release the keyboard and mouse which means that if your user does not press escape before moving around you might get strange behaviours. On a side note, having a spinbox that changes values just because my mouse hovers over it is counter-intuitive.
  • text append waits until hcitoo scan is finished

    Unsolved
    24
    0 Votes
    24 Posts
    3k Views
    J.HilkJ
    @JonB sure, here ya go :D #ifndef HCITOOLPROCESS_H #define HCITOOLPROCESS_H #include <QObject> #include <QProcess> #include <QElapsedTimer> #include <iostream> class HciToolProcess : public QObject { Q_OBJECT public: struct CommandAndArguments{ QString command; QStringList arguments; }; explicit HciToolProcess(QObject *parent = nullptr) : QObject(parent), m_index{-1} { connect(&m_process, QOverload<int,QProcess::ExitStatus>::of(&QProcess::finished), this, &HciToolProcess::onProcessFinished); } bool startProcess(QList<CommandAndArguments> commands){ if(m_index != -1 || commands.isEmpty()) return false; m_cmdAndArgs = commands; m_elapsedTime.start(); //m_index is -1 so the function will set it to 0 processCommandAndArguments(); return true; } signals: void timeElapsed(const QString &time); // to update your textEdit_2 void allProcessesDone(); private: void processCommandAndArguments(){ m_index++; if(m_index < m_cmdAndArgs.size()){ m_process.start(m_cmdAndArgs.at(m_index).command, m_cmdAndArgs.at(m_index).arguments, QIODevice::ReadWrite); } else { m_index = -1; emit allProcessesDone(); } } void onProcessFinished(int exitCode, QProcess::ExitStatus exitStatus){ std::cout<<"\n * Program to demonstrate the usage of linux commands in qt * \n"; QString StdOut = m_process.readAllStandardOutput(); //Reads standard output QString StdError = m_process.readAllStandardError(); //Reads standard error std::cout<<"\n Printing the standard output..........\n"; std::cout<<std::endl<<StdOut.toStdString(); std::cout<<"\n Printing the standard error..........\n"; std::cout<<std::endl<<StdError.toStdString(); std::cout<<"\n Printing exit code..........\n"; std::cout<<std::endl<<exitCode; std::cout<<"\n Printing exitStatus..........\n"; std::cout<<std::endl<<exitStatus; std::cout<<"\n\n"; QString elapsedTime = QString::number(m_elapsedTime.restart()); emit timeElapsed(elapsedTime); processCommandAndArguments(); } private: QElapsedTimer m_elapsedTime; QProcess m_process; QList<CommandAndArguments> m_cmdAndArgs; int32_t m_index; }; #endif // HCITOOLPROCESS_H
  • Can this be done in Qt?

    Unsolved
    6
    0 Votes
    6 Posts
    554 Views
    Pl45m4P
    @Driftwood A slot for what? I'm sure there is, no matter what you are going to answer (the default ones, of course). Custom behavior must be implemented depending on what you want to do with your text and widgets :) Like @mchinand said, a slot connected to the textChanged signal of every text field could work for you. You can check the content of textBoxes or comboBoxes and perform the rest of your actions. The syntax might change from wxWidgets to Qt. for example: if(!(lineEdit->text().isEmpty())){}
  • What do you call this kind of button?

    Unsolved
    6
    1 Votes
    6 Posts
    542 Views
    SGaistS
    Hi, Check @Chris-Kawa's burger-menu.
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    2 Views
    No one has replied
  • 2 views with different layout of the same data

    Solved
    17
    0 Votes
    17 Posts
    2k Views
    M
    Wow, that's a completely different approach, but it makes a lot of sense, and it is why I asked this question. I wanted to know if my general approach could be improved. thanks for sticking with me