Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.6k Topics 457.8k Posts
  • How to run "Network chat client example" in QT demos ?

    3
    0 Votes
    3 Posts
    3k Views
    A
    I am using eclipse so just make the application. Yestrday strange thing happened I removed and downloaded again the application and import the .pro file,then make the application again and now its working corectly but when I gave the command ./network-chat GUI comes up along with the pop up "Launch another instances on local network and start chatting" I am using two terminal for chatting and on both machines same pop up is coming and chatting is also not happening Please tell me what changes i have to do. Thanks Anu
  • Declaring a function from .dll in Qt4

    3
    0 Votes
    3 Posts
    2k Views
    V
    Actually, I know for a fact that these libraries I am trying to use (the dll) is a 32 bit windows API library. This might make this easier??
  • [Solved] Eclipse Integration missing widgets?

    3
    0 Votes
    3 Posts
    2k Views
    M
    Gah! Total newb mistake. Thanks!
  • 0 Votes
    5 Posts
    6k Views
    S
    Moving on. I decided to take a different tact, and maybe now I'm doing it the right way. @ int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); PollController *pollController = new PollController(); pollController->setup(1,1000); QThread *pollThread = new QThread(); QObject::connect(pollThread,SIGNAL(started()),pollController,SLOT(startPolling())); pollController->moveToThread(pollThread); pollThread->start(); return a.exec&#40;&#41;; } @ Inside the "pollController" class, I create a new instance of my QTcpSocket logger class when I have data to report to the web server. @ void PollController::msgReceived(QString &msg) { QString host = "web-dev"; int port = 85; //QString msg = "99.00.050.00.12345678.*"; qDebug() << "pollController received signal from analyze:" << msg; //emit(msgToLog(msg)); // Fire up a new logger Logger *logger = new Logger(this); logger->setup(host,port,msg); } @ It seems to work, I just wonder if I'm really doing things correctly now or am I just getting lucky that it's working in testing?
  • Glproxy in QtOpenCL

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Qmake INCLUDEPATH problem

    5
    0 Votes
    5 Posts
    13k Views
    G
    ah, correct. Environment vars are accessed with $$(xxx) and qmake variables with $${xxx}.
  • How to read From Client through server ?

    Locked
    3
    0 Votes
    3 Posts
    1k Views
    EddyE
    closed this one
  • Fast drawing in QT

    3
    0 Votes
    3 Posts
    4k Views
    B
    Tobias is right. However, you will probably want to think about what your architecture is doing. My guess is that you are doing this: Load jpeg -> decode in ram to RGB -> upload to GPU -> paint onto buffer So you've copied the image into ram, DMAed the image to the GPU, then copied it into the frame buffer. I'd suggest one of two alternative approaches: Draw the graphics without using opengl; hence cutting out the upload, use threading on your (presumably multicore) CPU to decode the images. Use the GPU hardware to decode your jpeg, then display it. #2 isn't easy but will get you a long way, because you will be copying compressed data into the GPU memory; where the GPU can then be used to rapidly convert the jpeg image into RGB. You can always break the jpeg decoding down into several steps - e.g. do most of the decoding on the cpu, then the final conversion to rgb on the gpu; then attack the next stage, etc... Good luck. -bms
  • Accessing MainWindow Actions through shortcuts from a QDialog (modeless)

    6
    0 Votes
    6 Posts
    5k Views
    G
    The snippet works for me. But watch out! If you're in a text or line edit or any other widget that takes the space key for any action, the shortcut will not trigger!
  • How to run a .msi file using QProcess?

    3
    0 Votes
    3 Posts
    3k Views
    G
    "this":http://lmgtfy.com/?q=run+msi+from+command+line might help.
  • 'busy' QProgressBar problems with style sheet

    2
    0 Votes
    2 Posts
    2k Views
    E
    does anyone know what's going on here? I'd like to style a window that contains a busy progress bar, but I cannot because the bar does not animate if there is a style sheet applied to any control in the window. can someone try to help me with this?
  • How can we open 2 qwidget simulatenously

    3
    0 Votes
    3 Posts
    1k Views
    F
    Can you post the code that opens/shows the clock? I suspect that either you are allocating it on the stack, as miroslav suggested, or you are opening it thru a widget that is going to be deleted.
  • [SOLVED] QUrl "file:" scheme trouble

    5
    0 Votes
    5 Posts
    4k Views
    S
    Thanks a lot! I'll try it.
  • QFile exist int system32 dir

    3
    0 Votes
    3 Posts
    2k Views
    S
    I resolve my problem. @QString getWindowsDir() { WCHAR dir[MAX_PATH]; SHGetFolderPath(0, CSIDL_WINDOWS, NULL, 0, dir); return QString::fromUtf16(reinterpret_cast<ushort*>(dir)); } QString path = getWindowsDir() + "\SysNative\" + file;@
  • OpenGL ES2 on the desktop

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • [solved] Filtering model in a locale-aware way

    7
    0 Votes
    7 Posts
    5k Views
    M
    This would be an awesome feature if provided by Qt itself. It seems it is coming up again and again and again.
  • Plastique Style color depends on color scheme (WinXP)

    3
    0 Votes
    3 Posts
    2k Views
    W
    Ok one way I found is to serialize qApplication.palette() to a file one time, then load it on every startup and qApplication.setPalette(pal). Is this the way to go? Seems to work...
  • Load font from .ttf file

    5
    0 Votes
    5 Posts
    12k Views
    P
    Hm I guess it won't be bug, it seems that there might be something wrong with my Qt4.8 installation. If I create new empty project with "Hello world!" its fonts are messed up. I'v tried to run some demos from qt and fonts are messed up too. I'v checked dir where Qt was installed (/usr/local/Trolltech/Qt-4.8.0) and in lib/ folder there wasn't fonts/ folder. I copied fonts folder there but fonts still look bad.
  • How to increase the size of the dialog box at run time?

    8
    0 Votes
    8 Posts
    5k Views
    A
    This is the code i wrote.....here contents adding properly....but dialog size not incrementing accordingly...please tell me what i'm missing here.... @void Dialog::Display_header(QStringList headerList) { for(int i=0;i&lt;headerList.count();i++) { QRadioButton *Rbutton= new QRadioButton(); Rbutton-&gt;setText(headerList.at(i)); ui->verticalLayout->addWidget(Rbutton); ui->verticalLayout->setAlignment(Qt::AlignTop); ui->verticalLayout->setSpacing(1); ui->verticalLayout->setStretch(1,1); } } @
  • How to place a GraphicsView in a layout object

    7
    0 Votes
    7 Posts
    3k Views
    C
    Assuming this is in a function, the QGraphicsView is a local variable: when it goes out of scope it's gone. You should dynamically allocate it (this seems to be "the Qt way") or make it a member variable of your class.