I am facing a strange problem regarding SystemDialog. I need to omit confirmButton & cancelButton from my dialog. And I put the following code to do so-
SystemUiButton *cancelButton = alertDialog->cancelButton();
cancelButton->setLabel(QString::null);
SystemUiButton *confirmButton = alertDialog->confirmButton();
confirmButton->setLabel(QString::null);
It's perfectly working in Z10. But in Q10 it's not working. My both device running on 10.1
Can you guys please put some feedback regarding this issue?
Thanks.
Related
I'm tring to learn ROS topic, but I met a problem that really confused me.
Here is the origin code. It works well, I can receive the image and pass it to CamImgcb.
mSubCam = mNh.subscribe<sensor_msgs::Image>(TopicNameCamSub,10,boost::bind(&ClientHandler::CamImgCb,this,_1));
But when I change it to this code below, CamImgcb can not receive anything, the whole program is stuck to wait for the image to come.
message_filters::Subscriber<sensor_msgs::Image> rgb_sub(mNh, TopicNameCamSub, 10);
rgb_sub.registerCallback(boost::bind(&ClientHandler::CamImgCb,this,_1));
My question is that aren't those two codes means the exact same thing? Why is there a difference between them? I just can't figure it out.
Does anyone know what is the problem? Please help me and thank you so much!
I had a similar issue a while back and found the solution here.
Try changing:
rgb_sub.registerCallback(boost::bind(&ClientHandler::CamImgCb,this,_1));
To:
rgb_sub.registerCallback(&ClientHandler::CamImgCb, this);
Solved it , the solution is here!
https://answers.ros.org/question/406915/nhsubscribe-works-but-message_filterssubscriber-not/
I have been playing with the SpriteView in iOS14 and its working quite well however, I noticed that some collisions that worked fine when using a UIViewcontroller would be missed using the SpriteView. So I thought to turn on showsPhysics to help with the debug. However I am stumped as to how I can do that as the skView is not available?
Can anyone help, I must be missing something.
cheers
S
So now I feel a bit dumb. The answer was to put the view.showsPhysics = true into the didMove(to view: SKView) call!
it is simple, you just need to add a new parameter wend you initialize the SpriteView:
SpriteView(scene: SKScene(), debugOptions: .showsPhysics)
I'm making a mobile game with SDL2 which will be initially developed for IOS.
I have almost finnished the game development, and now, in order to integrate it with Firebase, I need a pointer to UIViewController.
After reading countless topics, I tried this:
SDL_SysWMinfo systemWindowInfo;
SDL_VERSION (& systemWindowInfo.version);
SDL_GetWindowWMInfo (sdlWindow, & systemWindowInfo))
UIWindow * appWindow = mainWindowWMInfo.info.uikit.window;
UIViewController * rootViewController = appWindow.rootViewController;
But the line "UIViewController * rootViewController = appWindow.rootViewController;" causes this error: "Incomplete definition of type '_UIWindow'"
All topics related to this sample code are at least four years old, and I'm trying hard, but I haven't found any topics talking recently about how to get UIViewController in an SDL2 / ios project.
So, my questions are:
Is the sample code above still working in the current versions of SDL2 or has something changed in the latest version and this sample code no longer works?
If the sample code still works, what can I do wrong to cause this “Incomplete definition of type '_UIWindow'” error?
If this sample code no longer works in SDL2, how can I get a UIViewController pointer in the current version of SDL2?
Any help is welcome because I have been stuck in this problem for days. I've been working on this game for ten months and solving this problem is the last task left to complete it , so I really need to solve this issue.
I solve this problem. Everything is OK in SDL, I was using a .cpp file in this code, but I needed to use .mm file here.
So, when I switched the file name from cpp to mm, the problem has solved.
I have followed the included example within the gloox source code but cannot get it to work, nor can I find ANYWHERE through Google that's an example of what I am after. I desire a way to obtain the list of added XMPP contacts (roster, I believe?) upon making a connection to an XMPP server. The code I have currently been trying is below:
void GekkoFyre::TuiHangouts::handleRoster(const Roster &roster)
{
Roster::const_iterator it = roster.begin();
for ( ; it != roster.end(); ++it) {
rosterOutBuf.push_back((*it).second->name().c_str());
}
gui_userRosterList(userListWin, rosterOutBuf, 0);
}
Stepping through the code, I can see that this virtual function does not even activate. What am I doing wrong and can anyone offer a solution? Or even better, an example to follow from? Thank you in advance.
P.S.
I don't even know if this code is written correctly, since I cannot debug it if it doesn't activate!
Nevermind, silly me! I fixed the issue with the following code elsewhere:
#include <gloox/rostermanager.h>
Client *client = new Client(jid, passwd);
client->rosterManager()->registerRosterListener(this);
Apologies if I annoyed anyone.
I have some piece of code that looks like this:
std::unordered_map<std::string, std::shared_ptr<Foo>> map;
auto result = map.find("key i'm looking for");
when I try to use result in this fashion:
result->second->Bar()
my IDE can't autocomplete and tells me "No suggestions for members of auto0"
Is my syntax wrong or is it a shortcoming of the API?
EDIT: As it was pointed out, it would probably be a problem with my IDE. If anyone else can confirm this, I will report the issue on their issue tracker. I'm using CLion build CL 140.1740.3
Thank you
EDIT2: So I made a ticket. If anyone with the same problem reads this, here is the link to the issue https://youtrack.jetbrains.com/issue/CPP-2278
Your auto complete is not working correctly for some reason.