Skip to content

Qt Creator and other tools

Have a question about Qt Creator, our cross-platform IDE, or any of the other tools? Ask here!
7.6k Topics 35.5k Posts
  • Writing a custom dumper

    5
    0 Votes
    5 Posts
    2k Views
    O
    I found a simpler way: @d.putValue(extractCharArray(item.value["string"], 40))@
  • QMake - Architecture specific conditional compilation

    7
    0 Votes
    7 Posts
    6k Views
    D
    Ok. What do QMAKE_HOST.arch and QMAKE_TARGET.arch contain for your setup?
  • 0 Votes
    5 Posts
    16k Views
    O
    Oh my god, after reading a bit more on it, i really was making silly mistakes. Thanks guys
  • Set icon next to window title[SOLVED]

    3
    0 Votes
    3 Posts
    10k Views
    O
    Thanks, got it. The correct line is: @wave w; //where wave is my QMainWindow class w.setWindowIcon(QIcon("/image.jpg"));@
  • [SOLVED] using threads to eliminate a never ending loop

    9
    0 Votes
    9 Posts
    5k Views
    O
    Here is the solution: mythread.h: @#ifndef MYTHREAD_H #define MYTHREAD_H #include <QThread> class MyThread : public QThread { Q_OBJECT protected: void run(); public: explicit MyThread(QObject *parent = 0); }; #endif // MYTHREAD_H @ mythread.cpp: @#include "wave.h" #include "mythread.h" MyThread::MyThread(QObject *parent) : QThread(parent) { } void MyThread::run() { onWriteLoop(); }@ wave.cpp: @wave::wave(QWidget *parent) : QMainWindow(parent), ui(new Ui::wave) { ui->setupUi(this); setup(); thread = new MyThread(); } wave::~wave() { delete ui; delete thread; } void wave::on_pushButton_clicked() { //Generate freq = ui->frequency->text().toDouble(); ampl = ui->amplitude->text().toDouble(); thread->start(); ui->pushButton->setEnabled(false); ui->pushButton->setStyleSheet("background-color: gray"); ui->pushButton_2->setStyleSheet("background-color: rgb(255, 192, 192);" "color: red;"); ui->pushButton_2->setEnabled(true); } void wave::on_pushButton_2_clicked() { //Terminate thread->terminate(); ui->pushButton_2->setEnabled(false); ui->pushButton_2->setStyleSheet("background-color: gray"); ui->pushButton->setStyleSheet("background-color: rgb(192, 255, 208);" "color: green;"); ui->pushButton->setEnabled(true); }@
  • 0 Votes
    5 Posts
    4k Views
    G
    It actually seems to be a Qt bug. The new bug ID is "QTBUG-20925":https://bugreports.qt.nokia.com/browse/QTBUG-20925
  • Folder depending on the architecture doesn't work

    5
    0 Votes
    5 Posts
    3k Views
    L
    But it can be in the same directory where I put now? Or I have to put it outside?
  • [Moved] configure prefix

    6
    0 Votes
    6 Posts
    4k Views
    T
    I would personally not put the command into the Qt Creator settings at all: You do not want to keep re-running this for each and every build! So just run it once from a terminal and then only add the "make" step to Qt Creator. That should work fine.
  • GLwidget plugin causes Qt Creator to crash

    3
    0 Votes
    3 Posts
    2k Views
    N
    Well, this works. It's rather unsatisfying though, since this means everyone on the team needs an alternative build rather than using the standard binary provided on the qt download page. Also seems to cause a crash when loading other plugins, presumably because they're compiled with 4.7.4.
  • Unable to call .first of array[SOLVED]

    3
    0 Votes
    3 Posts
    1k Views
    O
    solved. areas had different values as it was declared again.
  • [Moved] debug

    2
    0 Votes
    2 Posts
    1k Views
    EddyE
    Basically you click in front of the line where you want to place a bookmark. Then you click the green arrow button with a bug on it. Use the buttons to step in/out code blocks. You can read about it in the Qt Creator manual too.
  • QMainWIndow not popping up when I run

    25
    0 Votes
    25 Posts
    10k Views
    O
    [quote author="Gerolf" date="1312906849"] [quote author="ogopa" date="1312902815"][quote author="Gerolf" date="1312900157"]# Did you check, whether line 25 is executed? Did you try to debug it and step through to check what happens? You have an endless loop here (where is isTrue set to false?) If you provide a full, runnable and debuggable example, perhaps others could also try with the debugger...[/quote] Hi, yes line 25 has executed. I just debugged it and there seems to be no issues. isTrue is set to false under my second pushButton function (pushButton2) which is to terminate the loop. I have actually solved the issue, it doesn't terminate anymore. There are no more errors, but now, the problem is when I hit the pushButton, it doesn't generate any sine wave:( Definitely, here is my wave.cpp: [/quote] Hi, As the loop executed on a button press, which means runs inside the main event loop, tzhe second button press will never be executed, as the main thread is blocked. Regarding the other thing, I have no idea, as I have no experience in sound card programming... [/quote] ok. Thanks for your help. Much appreciated.
  • How to draw rectangle, rhombus, triangle at the extremities of lines

    2
    0 Votes
    2 Posts
    4k Views
    EddyE
    Have a look at the "diagram scene example":http://doc.qt.nokia.com/4.7/graphicsview-diagramscene.html I think this is what you want. Fortunately I remembered a previous topic you made so I could guess you're drawing on a QGraphicsscene. Please provide more information if you want specific answers.
  • Problem using RSA algorythme in QCA

    18
    0 Votes
    18 Posts
    13k Views
    Z
    I'll leave Volker to answer for the Mac side of things but on Windows I use NSIS to build an installer. I've already told you how to structure your installation dir on Windows but here it is again: @ $INSTALLDIR $INSTALLDIR/application.exe $INSTALLDIR/$QTLIBS $INSTALLDIR/{libeay32.dll, ssleay32.dll, libssl32.dll} $INSTALLDIR/qca2.dll $INSTALLDIR/crypto/qca-ossl.dll @ This really is much less work than trying to compile all of these projects into your application.
  • Turn off popup when typing function

    14
    0 Votes
    14 Posts
    6k Views
    EddyE
    Thanks again! I added a Link to this topic there to avoid the developers have the same misunderstanding as we had here ;) And i voted for it!
  • QtCreator linking problem

    5
    0 Votes
    5 Posts
    4k Views
    D
    are you really literally using "CONFIG" as scope? if so, what do you want to achieve?
  • Can't <Enter> Using Voice Recognition Macros In Fake VIM Mode

    6
    0 Votes
    6 Posts
    3k Views
    T
    This works for me, it's not pretty, but now I can say "loop" @ for ( int ii = 0 ; ii < max; ii++ ) +[{ESC}o+]{ESC}ko @ Now all I need is a little processor to turn actual code into a Dragon macro :)
  • 0 Votes
    8 Posts
    3k Views
    D
    Or just hit <Escape>
  • 0 Votes
    2 Posts
    2k Views
    L
    Just create 2 .pro files (you can put options that are shared in a .pri file and use include()) and adjust $$DESTDIR and all directories that will contain intermediate files that are different between the two versions: @ MOC_DIR OBJECTS_DIR RCC_DIR UI_DIR QMAKE_MAKEFILE @
  • Custom plugin for Qt Simulator

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied