Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.7k Posts
  • Qt to linux terminal

    8
    0 Votes
    8 Posts
    6k Views
    T
    [quote author="AcerExtensa" date="1329207608"]@test.waitForFinished(); qDebug() << "gelen :"<<test.readAllStandardOutput ();@ or use singal/slots: @void error ( QProcess::ProcessError error ) void finished ( int exitCode, QProcess::ExitStatus exitStatus ) void readyReadStandardError () void readyReadStandardOutput () void started () void stateChanged ( QProcess::ProcessState newState )@[/quote] i've solved it thanks =) appearantly i have to put the "waitForFinished()" method.
  • 0 Votes
    2 Posts
    2k Views
    G
    You cannot rely on the fact that headerData is only called once. If you have pagination, I would add an attribute to the model, holding the current start index (= offset from the start) of the result set (as passed to limit/offset in the query) and in headerData just add that offset to the section number. This way your return value is always the same.
  • Custom object type and QList

    8
    0 Votes
    8 Posts
    7k Views
    M
    Thx, big thx for advise))) !!!
  • 0 Votes
    3 Posts
    3k Views
    A
    Please, mark your thread as SOLVED in the name of thread.
  • 48 to 120 FPS 3D Image Viewer.

    2
    0 Votes
    2 Posts
    2k Views
    A
    I think you need use something like OpenGL. Cause you need to handle all operations with your videocard.
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • Implementing the QIODevice read stream as a RingBuffer

    3
    0 Votes
    3 Posts
    4k Views
    S
    thanx batosai i will try that...
  • Tool chain

    11
    0 Votes
    11 Posts
    4k Views
    T
    It is a 16bit unsigned int IIRC, so no.
  • QScrollArea

    8
    0 Votes
    8 Posts
    5k Views
    K
    thank you very much!!
  • [Solved] Customizing QTableWidget

    6
    0 Votes
    6 Posts
    3k Views
    F
    I pointed you to the documentation that allows you to get back the headers, and then you can call setVisible on them.
  • 0 Votes
    5 Posts
    8k Views
    B
    Yes. But I can't override the paintEvent of each child widget, because they were created in Designer (with UI). So maximum I can do - is try to install eventFilter on every widget like this: @MyWidget::MyWIdget(QWidget parent) : QWidget(parent) { QList<QWidget > widgets = findChildren<QWidget>(); foreach(QWidget widget, widgets) { widget->installEventFilter(this); } } MyWidget::eventFilter(QObject* object, QEvent* event) { if(event->type() == QEvent::Paint) { QPaintEvent* paintEvent = static_cast<QPaintEvent*>(event); if(_rowCount == 0) paintEmptyWidget(widget, /// Function like I describe above paintEvent->rect(), "Emty text", "Note text"); return true; } return QWidget::eventFilter(object,event); } @ But it doesn't work as I need. [quote author="shoyeb" date="1329193466"]then u need to override the paint event of each child widget... i am not sure that this will work but atleast u can try..[/quote]
  • 0 Votes
    4 Posts
    2k Views
    G
    "case 4" does not have a statement. You must add a regular statement/return statement or just break.
  • 0 Votes
    2 Posts
    3k Views
    S
    QGraphicsScene::selectionChanged is the signal you might be looking for.
  • Pass DBus method call an array

    2
    0 Votes
    2 Posts
    2k Views
    G
    operator<< of QDBusMessage takes a QVariant as argument. There's no implicit conversion between an array of uchar and QVariant, that's why the compiler bails out. You will have to create a QVariant with the contents of your array.
  • QPersistentModelIndex problems in debug libraries

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Simple form with pixel manipulation

    12
    0 Votes
    12 Posts
    7k Views
    M
    @QImage image(800, 600, QImage::Format_ARGB32); QPainter painter(&image); // make a dark qimage for(int i=1;i<800;i++){ for(int j=1;j<600;j++){ painter.setPen(QColor(0, 0, 0)); painter.drawPoint(i,j); } } scene->addPixmap(QPixmap::fromImage(image)); view->setScene(scene); layout->addWidget(view); w.setLayout(layout); w.show(); for(int i=1;i<8000;i++){ for(int j=1;j<600;j++){ painter.setPen(QColor(i%5, i%5, j%5)); painter.drawPoint(i,j); } } scene->addPixmap(QPixmap::fromImage(image)); view->setScene(scene);@ it takes some time to draw the form but i want to see the result after each iteration. is it possible?
  • Simple calculation using line edit

    5
    0 Votes
    5 Posts
    3k Views
    C
    I went through couple of demo calculator apps and all of them seem to have a single line edit handling all the operations. In addition to that, the line edit seems divided in half since while the different operations take place you can merely see the result at a specific time, unless you hit the "=" key which somehow terminates the calculations and displays the final result. Similar to Windows default calculator... Can someone please explain how can I possibly add that to my calculator app as well? Thank you in advance.
  • Disable Proxy connections in QTcpSocket

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Is there some way to generate random Multicast address ?

    5
    0 Votes
    5 Posts
    4k Views
    M
    I need to solve similar issue, some one know how to check is multicast group exists?
  • 0 Votes
    5 Posts
    7k Views
    G
    [quote author="Ashish Mittal" date="1329131286"]Thanks a lot Volker!!!!, I am able to solve the problem by moving my entire code from custom thread class to a class derived from Qobject and I simply called MoveToThread() on this object. [/quote] Correct. That's the way QThread is supposed to use now.