Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.5k Topics 457.3k Posts
  • Selection in QOpenGLWidget

    Unsolved
    1
    0 Votes
    1 Posts
    323 Views
    No one has replied
  • Cannot run Qt example in Qt creator: The program has unexpectedly finished

    Solved
    9
    0 Votes
    9 Posts
    5k Views
    J
    @Oleksandr-Malyushytskyy Yes possibly. Could be Qt WebEngine.
  • Qt debug info with Online installer on Windows

    Solved
    14
    0 Votes
    14 Posts
    2k Views
    E
    @qtProgrammer said in Qt debug info with Online installer on Windows: I also need Qt sources so that i can debug into them. Ah, of course.
  • Convert NonAscii ByteArray data to QString

    Unsolved
    7
    0 Votes
    7 Posts
    2k Views
    matthew.kuiashM
    @Beemaneni-Bala Marvellous, if the solves your problem please mark the thread as "Solved".
  • Progress bar issue for Http request

    Unsolved
    3
    0 Votes
    3 Posts
    703 Views
    SGaistS
    Hi, On a side note, this line: Home* homeObj = qobject_cast<Home *>(this->parent()->parent()->parent()->parent()); Is very very nasty. You have created a very tight coupling on 4 ancestors. This is really not a good design. You should forward the signal upper and update the progress bar from your Home object but not 4 levels down in a class that should not even care whether there's something connect to it's progress signal.
  • Insert data after the corresponding node in XML

    Unsolved xml
    2
    0 Votes
    2 Posts
    880 Views
    matthew.kuiashM
    @Pradeep-Kumar Do you have your code please? Sounds like you're adding nodes at the root level. You need to insert a sibling after the first/second node.
  • Field does not get saved correctly

    Solved
    7
    0 Votes
    7 Posts
    1k Views
    P
    I replaced them with QPlainTextEdit textboxes and so the code: model->setData(model->index(row, model->fieldIndex("model")), ui.model_txt->toPlainText()); is not needed.
  • Change language at runtime

    Solved
    6
    0 Votes
    6 Posts
    5k Views
    Cobra91151C
    @VRonin I have changed your code to: comboBox->model()->setData(comboBox->model()->index(0,0), QObject::tr("Text")); And now it's retranslating QComboBox. I post it here so others can find the solution. Thank you for your reply.
  • Qt Creator, debugging, cannot insert breakpoint error

    Unsolved
    5
    0 Votes
    5 Posts
    3k Views
    kshegunovK
    It's a bit unclear, you built QtCreator or you installed it?
  • 0 Votes
    6 Posts
    7k Views
    J.HilkJ
    You can define an accessibleName for your objects and distribute different StyleSheets. either via the designer or QWidget::setAccessibleName(const QString &name); e.g. QPushButton{ background-color: blue; } QPushButton[accessibleName="SpecialButton1"] { background-color: red; }
  • SerialPort in a different Thread

    Solved qthread serial port qtimer
    2
    0 Votes
    2 Posts
    1k Views
    J.HilkJ
    Never mind, I had code in my the constructor of the to be threaded class, that caused the conflict... connect(&modbusThread, &QThread::started, modbusDevice, &Modbus::setupClass); fixed the issue.
  • Send Signals between different Qml Objects

    Solved
    5
    0 Votes
    5 Posts
    2k Views
    N
    @dheerendra Your post helped me alot and thank you for the explanation.!
  • Using QVector<> as std::vector<> without duplicating the data

    Solved
    6
    0 Votes
    6 Posts
    8k Views
    kshegunovK
    Well, there's also an alternative to modifying the QCustomPlot sources, but it comes with a disclaimer. Consider this specialization: class MyType; //< Whatever your type is template <> static inline QVector<MyType> QVector<MyType>::fromStdVector(const std::vector<MyType> & vector) { QVector<MyType> tmp; tmp.d = QTypedArrayData<MyType>::fromRawData(vector.data(), vector.size(), Unsharable); return tmp; } Here goes the disclaimer: I haven't tested that, it's hacking into Qt's internals, so use at your own discretion. You have to ensure the std::vector instance will not go out of scope while any one QVector instance holds reference to the data
  • how to fix QT5.3 &&QT5.7 complier difference

    Unsolved
    29
    0 Votes
    29 Posts
    9k Views
    J
    @jsulm well , i hope so
  • QSql::Location : enum type redefinition

    Unsolved
    6
    0 Votes
    6 Posts
    1k Views
    jsulmJ
    @Assil Without the build log (what @SGaist asked for) it is hard to say what the problem is. So, why not just post the build log?
  • Added widgets manually to Qt generated code, shown in 2nd window

    Solved
    18
    0 Votes
    18 Posts
    4k Views
    O
    @jsulm Thank you very much. Now I corrected the program , it is running. Thanks to all who have helped me.
  • QTreeView - branch buttons appearance and size

    Unsolved
    2
    0 Votes
    2 Posts
    946 Views
    VRoninV
    You can do it styling QTreeView::branch see http://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qtreeview
  • How to make lineEdit acceptable only integers?

    Unsolved qlineedit input qtdesigner
    7
    0 Votes
    7 Posts
    33k Views
    G
    Hi, for an integer input between 0 and 100 set the mask to "009". Thats all.
  • TreeView with functionality to go back and forth flat list and hierarchical view?

    Unsolved
    3
    0 Votes
    3 Posts
    1k Views
    VRoninV
    I think you are describing exactly the functionality of KDescendantsProxyModel
  • QSlider stylesheet handle gets slightly cut off on linux but looks fine on windows

    Solved
    2
    0 Votes
    2 Posts
    827 Views
    T
    I figured it out, it wasn't a stylesheet problem. I had to add slider->setFixedHeight(20) and it worked. [image: b468d3df43094208a536df84faf80c18.png]